From ce6b1d2b1c02ca18067606f38e5dc371466188f8 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 17 Aug 2021 04:54:37 +0000 Subject: [PATCH] CodeGen from PR 15670 in Azure/azure-rest-api-specs Merge 463a303959d8bde96488bfbabb240a711f62c7fd into 60d6c393c7e71b45ebe0976a35fd7a5841993159 --- .../CHANGELOG.md | 3 +- .../README.md | 6 +- .../pom.xml | 141 +- .../MachineLearningServicesManager.java | 289 +- .../AzureMachineLearningWorkspaces.java | 144 +- .../fluent/BatchDeploymentsClient.java | 208 ++ .../fluent/BatchEndpointsClient.java | 213 ++ .../fluent/CodeContainersClient.java | 135 + .../fluent/CodeVersionsClient.java | 157 ++ ...omputesClient.java => ComputesClient.java} | 107 +- .../fluent/DataContainersClient.java | 135 + .../fluent/DataVersionsClient.java | 159 ++ .../fluent/DatastoresClient.java | 188 ++ .../fluent/EnvironmentContainersClient.java | 139 + ...nvironmentSpecificationVersionsClient.java | 165 ++ .../fluent/JobsClient.java | 203 ++ .../fluent/LabelingJobsClient.java | 329 +++ .../fluent/MachineLearningServicesClient.java | 207 -- .../fluent/ModelContainersClient.java | 136 + .../fluent/ModelVersionsClient.java | 167 ++ .../fluent/NotebooksClient.java | 89 - .../fluent/OnlineDeploymentsClient.java | 378 +++ .../fluent/OnlineEndpointsClient.java | 442 ++++ .../PrivateEndpointConnectionsClient.java | 44 +- .../fluent/PrivateLinkResourcesClient.java | 8 +- .../fluent/StorageAccountsClient.java | 38 - .../fluent/WorkspaceConnectionsClient.java | 21 +- .../fluent/WorkspaceFeaturesClient.java | 4 +- ...nsClient.java => WorkspaceSkusClient.java} | 8 +- .../fluent/WorkspacesClient.java | 143 +- .../BatchDeploymentTrackedResourceInner.java | 150 ++ .../fluent/models/BatchEndpointInner.java | 197 ++ .../BatchEndpointTrackedResourceInner.java | 149 ++ .../models/CodeContainerResourceInner.java | 76 + .../models/CodeVersionResourceInner.java | 76 + .../fluent/models/ComputeResourceInner.java | 116 +- .../models/DataContainerResourceInner.java | 76 + .../models/DataVersionResourceInner.java | 76 + .../DatastorePropertiesResourceInner.java | 76 + .../fluent/models/DatastoreSecretsInner.java | 46 + .../fluent/models/DeploymentLogsInner.java | 50 + .../models/EndpointAuthKeysInner.java} | 16 +- .../fluent/models/EndpointAuthTokenInner.java | 128 + .../EnvironmentContainerResourceInner.java | 76 + ...mentSpecificationVersionResourceInner.java | 77 + .../fluent/models/ExportSummaryInner.java | 102 + .../fluent/models/JobBaseResourceInner.java | 75 + .../models/LabelingJobResourceInner.java | 76 + .../models/ModelContainerResourceInner.java | 76 + .../models/ModelVersionResourceInner.java | 76 + .../OnlineDeploymentTrackedResourceInner.java | 150 ++ .../fluent/models/OnlineEndpointInner.java | 245 ++ .../OnlineEndpointTrackedResourceInner.java | 149 ++ .../PrivateEndpointConnectionInner.java | 180 +- .../fluent/models/ResourceQuotaInner.java | 4 +- .../fluent/models/ServiceResourceInner.java | 146 -- .../VirtualMachineSizeListResultInner.java | 24 +- .../fluent/models/WorkspaceInner.java | 206 +- ...AzureMachineLearningWorkspacesBuilder.java | 4 +- .../AzureMachineLearningWorkspacesImpl.java | 306 ++- .../BatchDeploymentTrackedResourceImpl.java | 241 ++ .../BatchDeploymentsClientImpl.java | 1284 +++++++++ .../implementation/BatchDeploymentsImpl.java | 242 ++ .../implementation/BatchEndpointImpl.java | 77 + .../BatchEndpointTrackedResourceImpl.java | 252 ++ .../BatchEndpointsClientImpl.java | 1334 ++++++++++ .../implementation/BatchEndpointsImpl.java | 224 ++ .../CodeContainerResourceImpl.java | 144 + .../CodeContainersClientImpl.java | 914 +++++++ .../implementation/CodeContainersImpl.java | 192 ++ .../CodeVersionResourceImpl.java | 150 ++ .../CodeVersionsClientImpl.java | 1022 ++++++++ .../implementation/CodeVersionsImpl.java | 227 ++ .../implementation/ComputeResourceImpl.java | 73 +- ...lientImpl.java => ComputesClientImpl.java} | 454 +++- ...ingComputesImpl.java => ComputesImpl.java} | 41 +- .../DataContainerResourceImpl.java | 144 + .../DataContainersClientImpl.java | 914 +++++++ .../implementation/DataContainersImpl.java | 192 ++ .../DataVersionResourceImpl.java | 150 ++ .../DataVersionsClientImpl.java | 1048 ++++++++ .../implementation/DataVersionsImpl.java | 228 ++ .../DatastorePropertiesResourceImpl.java | 178 ++ .../implementation/DatastoreSecretsImpl.java | 29 + .../implementation/DatastoresClientImpl.java | 1288 +++++++++ .../implementation/DatastoresImpl.java | 241 ++ .../implementation/DeploymentLogsImpl.java | 33 + .../implementation/EndpointAuthKeysImpl.java | 37 + .../implementation/EndpointAuthTokenImpl.java | 45 + .../EnvironmentContainerResourceImpl.java | 146 ++ .../EnvironmentContainersClientImpl.java | 925 +++++++ .../EnvironmentContainersImpl.java | 193 ++ ...nmentSpecificationVersionResourceImpl.java | 153 ++ ...onmentSpecificationVersionsClientImpl.java | 1047 ++++++++ .../EnvironmentSpecificationVersionsImpl.java | 230 ++ .../implementation/ExportSummaryImpl.java | 46 + .../implementation/JobBaseResourceImpl.java | 152 ++ ...cesClientImpl.java => JobsClientImpl.java} | 1029 ++++---- ...earningServicesImpl.java => JobsImpl.java} | 164 +- .../LabelingJobResourceImpl.java | 183 ++ .../LabelingJobsClientImpl.java | 1835 +++++++++++++ .../implementation/LabelingJobsImpl.java | 253 ++ .../ModelContainerResourceImpl.java | 144 + .../ModelContainersClientImpl.java | 932 +++++++ .../implementation/ModelContainersImpl.java | 192 ++ .../ModelVersionResourceImpl.java | 150 ++ .../ModelVersionsClientImpl.java | 1170 +++++++++ .../implementation/ModelVersionsImpl.java | 246 ++ .../implementation/NotebooksClientImpl.java | 455 ---- .../implementation/NotebooksImpl.java | 82 - .../OnlineDeploymentTrackedResourceImpl.java | 251 ++ .../OnlineDeploymentsClientImpl.java | 1915 ++++++++++++++ .../implementation/OnlineDeploymentsImpl.java | 278 ++ .../implementation/OnlineEndpointImpl.java | 86 + .../OnlineEndpointTrackedResourceImpl.java | 267 ++ .../OnlineEndpointsClientImpl.java | 2313 +++++++++++++++++ .../implementation/OnlineEndpointsImpl.java | 287 ++ .../PrivateEndpointConnectionImpl.java | 50 +- .../PrivateEndpointConnectionsClientImpl.java | 239 +- .../PrivateEndpointConnectionsImpl.java | 14 + .../PrivateLinkResourcesClientImpl.java | 33 +- .../PrivateLinkResourcesImpl.java | 9 +- .../implementation/ServiceResourceImpl.java | 244 -- .../StorageAccountsClientImpl.java | 211 -- .../implementation/StorageAccountsImpl.java | 62 - .../VirtualMachineSizeListResultImpl.java | 4 +- .../WorkspaceConnectionImpl.java | 23 +- .../WorkspaceConnectionsClientImpl.java | 57 +- .../WorkspaceFeaturesClientImpl.java | 12 +- .../implementation/WorkspaceImpl.java | 92 +- ...Impl.java => WorkspaceSkusClientImpl.java} | 58 +- ...ationsImpl.java => WorkspaceSkusImpl.java} | 24 +- .../implementation/WorkspacesClientImpl.java | 666 ++++- .../implementation/WorkspacesImpl.java | 74 + .../AccountKeyDatastoreCredentials.java | 59 + .../models/AccountKeyDatastoreSecrets.java | 57 + .../models/AciServiceCreateRequest.java | 374 --- ...AciServiceCreateRequestDataCollection.java | 39 - ...viceCreateRequestEncryptionProperties.java | 46 - ...ServiceCreateRequestVnetConfiguration.java | 39 - .../models/AciServiceResponse.java | 515 ---- .../AciServiceResponseDataCollection.java | 39 - ...ciServiceResponseEncryptionProperties.java | 46 - ...erviceResponseEnvironmentImageRequest.java | 69 - .../AciServiceResponseVnetConfiguration.java | 39 - .../models/AksReplicaStatus.java | 131 - .../models/AksReplicaStatusError.java | 24 - .../models/AksServiceCreateRequest.java | 450 ---- .../AksServiceCreateRequestAutoScaler.java | 60 - ...AksServiceCreateRequestDataCollection.java | 39 - ...reateRequestLivenessProbeRequirements.java | 61 - .../models/AksServiceResponse.java | 558 ---- .../models/AksServiceResponseAutoScaler.java | 60 - .../AksServiceResponseDataCollection.java | 39 - .../AksServiceResponseDeploymentStatus.java | 53 - ...erviceResponseEnvironmentImageRequest.java | 69 - ...viceResponseLivenessProbeRequirements.java | 60 - .../models/AksVariantResponse.java | 143 - .../models/AmlComputeNodeInformation.java | 20 +- .../models/AmlComputeProperties.java | 115 +- ...seBaseImageRegistry.java => AmlToken.java} | 17 +- .../models/AssetReferenceBase.java | 37 + .../models/AutoScaleSettings.java | 100 + .../models/AutoScaler.java | 157 -- .../models/AzureBlobContents.java | 187 ++ .../models/AzureDataLakeGen1Contents.java | 96 + .../models/AzureDataLakeGen2Contents.java | 192 ++ .../models/AzureFileContents.java | 187 ++ .../models/AzurePostgreSqlContents.java | 212 ++ .../models/AzureSqlDatabaseContents.java | 186 ++ .../models/BanditPolicy.java | 96 + .../models/BaseComputeResource.java | 53 + .../models/BatchDeployment.java | 401 +++ .../BatchDeploymentTrackedResource.java | 293 +++ ...mentTrackedResourceArmPaginatedResult.java | 85 + .../models/BatchDeployments.java | 163 ++ .../models/BatchEndpoint.java | 68 + .../models/BatchEndpointTrackedResource.java | 313 +++ ...ointTrackedResourceArmPaginatedResult.java | 85 + .../models/BatchEndpoints.java | 176 ++ .../models/BatchLoggingLevel.java | 37 + .../models/BatchOutputAction.java | 34 + .../models/BatchOutputConfiguration.java | 76 + .../models/BatchRetrySettings.java | 77 + .../CertificateDatastoreCredentials.java | 208 ++ .../models/CertificateDatastoreSecrets.java | 57 + .../models/CocoExportSummary.java | 61 + .../models/CodeConfiguration.java | 81 + .../models/CodeContainer.java | 106 + .../models/CodeContainerResource.java | 160 ++ ...deContainerResourceArmPaginatedResult.java | 84 + .../models/CodeContainers.java | 146 ++ .../models/CodeVersion.java | 189 ++ .../models/CodeVersionResource.java | 161 ++ ...CodeVersionResourceArmPaginatedResult.java | 84 + .../models/CodeVersions.java | 161 ++ .../models/CommandJob.java | 472 ++++ .../models/ComputeConfiguration.java | 183 ++ .../models/ComputeEnvironmentType.java | 34 - .../models/ComputeInstanceProperties.java | 66 +- .../models/ComputeInstanceSshSettings.java | 20 +- .../models/ComputePowerAction.java | 34 + .../models/ComputeResource.java | 130 +- .../models/ComputeSchedules.java | 54 + .../models/ComputeStartStopSchedule.java | 190 ++ ...ineLearningComputes.java => Computes.java} | 77 +- ...ava => ComputesCreateOrUpdateHeaders.java} | 11 +- ...va => ComputesCreateOrUpdateResponse.java} | 12 +- ...eaders.java => ComputesDeleteHeaders.java} | 14 +- .../models/ComputesDeleteResponse.java | 26 + .../models/ContainerRegistry.java | 102 - .../models/ContainerType.java | 34 + .../models/ContentsType.java | 52 + .../models/CreateEndpointVariantRequest.java | 158 -- .../models/CreateServiceRequest.java | 201 -- ...ServiceRequestEnvironmentImageRequest.java | 69 - .../models/CredentialsType.java | 46 + .../machinelearningservices/models/Cron.java | 102 + .../models/CsvExportSummary.java | 61 + .../models/DataBindingMode.java | 37 + .../models/DataContainer.java | 106 + .../models/DataContainerResource.java | 160 ++ ...taContainerResourceArmPaginatedResult.java | 84 + .../models/DataContainers.java | 146 ++ .../models/DataFactory.java | 4 +- .../models/DataPathAssetReference.java | 82 + .../models/DataVersion.java | 215 ++ .../models/DataVersionResource.java | 161 ++ ...DataVersionResourceArmPaginatedResult.java | 84 + .../models/DataVersions.java | 163 ++ .../models/DatasetExportSummary.java | 46 + .../models/DatasetReference.java | 76 - .../models/DatasetType.java | 34 + .../models/DatastoreContents.java | 41 + .../models/DatastoreCredentials.java | 40 + .../models/DatastoreProperties.java | 211 ++ .../models/DatastorePropertiesResource.java | 202 ++ ...ePropertiesResourceArmPaginatedResult.java | 85 + .../models/DatastoreSecrets.java | 17 + .../models/Datastores.java | 190 ++ .../models/DaysOfWeek.java | 62 + .../models/DeploymentLogs.java | 24 + .../models/DeploymentLogsRequest.java | 76 + .../models/DeploymentProvisioningState.java | 49 + .../models/DeploymentType.java | 37 - .../models/DistributionConfiguration.java | 37 + .../models/DistributionType.java | 37 + .../models/DockerBuild.java | 108 + .../models/DockerImage.java | 78 + .../models/DockerImagePlatform.java | 50 + .../models/DockerSpecification.java | 66 + .../models/DockerSpecificationType.java | 34 + .../models/EarlyTerminationPolicy.java | 90 + .../models/EarlyTerminationPolicyType.java | 37 + .../models/EncryptionProperties.java | 118 - .../models/EndpointAuthKeys.java | 31 + .../models/EndpointAuthMode.java | 37 + .../models/EndpointAuthToken.java | 45 + .../models/EndpointComputeType.java | 37 + .../models/EndpointProvisioningState.java | 46 + .../models/EnvironmentContainer.java | 106 + .../models/EnvironmentContainerResource.java | 161 ++ ...ntContainerResourceArmPaginatedResult.java | 85 + .../models/EnvironmentContainers.java | 146 ++ .../models/EnvironmentImageRequest.java | 194 -- .../EnvironmentImageRequestEnvironment.java | 82 - ...nmentImageRequestEnvironmentReference.java | 39 - .../models/EnvironmentImageResponse.java | 194 -- .../EnvironmentImageResponseEnvironment.java | 82 - ...mentImageResponseEnvironmentReference.java | 40 - .../models/EnvironmentReference.java | 76 - .../models/EnvironmentSpecificationType.java | 34 + .../EnvironmentSpecificationVersion.java | 251 ++ ...vironmentSpecificationVersionResource.java | 163 ++ ...tionVersionResourceArmPaginatedResult.java | 87 + .../EnvironmentSpecificationVersions.java | 163 ++ .../models/EstimatedVMPrice.java | 18 +- .../models/EstimatedVMPrices.java | 30 +- .../models/ExportFormatType.java | 37 + .../models/ExportSummary.java | 46 + .../models/FlavorData.java | 53 + .../models/GlusterFsContents.java | 92 + .../machinelearningservices/models/Goal.java | 34 + .../models/IdAssetReference.java | 61 + .../models/Identity.java | 2 + .../models/IdentityConfiguration.java | 36 + .../models/IdentityConfigurationType.java | 34 + .../models/ImageAnnotationType.java | 37 + .../models/ImageAsset.java | 128 - .../models/InferenceContainerProperties.java | 112 + .../models/InputDataBinding.java | 102 + .../models/JobBase.java | 163 ++ .../models/JobBaseResource.java | 180 ++ .../JobBaseResourceArmPaginatedResult.java | 82 + .../models/JobEndpoint.java | 131 + .../models/JobOutput.java | 57 + .../models/JobProvisioningState.java | 40 + .../models/JobStatus.java | 70 + .../models/JobType.java | 37 + .../machinelearningservices/models/Jobs.java | 179 ++ .../models/JobsDeleteHeaders.java | 103 + .../models/JobsDeleteResponse.java | 26 + .../models/K8SOnlineDeployment.java | 134 + .../models/KeyType.java | 34 + .../models/LabelCategory.java | 116 + .../models/LabelClass.java | 89 + .../models/LabelingDatasetConfiguration.java | 102 + .../models/LabelingJob.java | 419 +++ .../models/LabelingJobImageProperties.java | 56 + ...onse.java => LabelingJobInstructions.java} | 30 +- .../models/LabelingJobMediaProperties.java | 36 + .../models/LabelingJobResource.java | 222 ++ ...LabelingJobResourceArmPaginatedResult.java | 84 + .../models/LabelingJobTextProperties.java | 56 + .../models/LabelingJobs.java | 239 ++ .../LabelingJobsCreateOrUpdateHeaders.java | 77 + ...> LabelingJobsCreateOrUpdateResponse.java} | 18 +- .../LabelingJobsExportLabelsHeaders.java | 76 + .../LabelingJobsExportLabelsResponse.java | 38 + .../models/LabelingJobsResumeHeaders.java | 76 + .../models/LabelingJobsResumeResponse.java | 26 + .../models/LinkedInfo.java | 102 + .../models/LivenessProbeRequirements.java | 154 -- .../models/MLAssistConfiguration.java | 108 + ...LearningComputesCreateOrUpdateHeaders.java | 51 - .../models/ManagedIdentity.java | 118 + .../models/ManagedOnlineDeployment.java | 156 ++ .../models/ManualScaleSettings.java | 70 + .../models/MediaType.java | 34 + .../models/MedianStoppingPolicy.java | 43 + .../machinelearningservices/models/Model.java | 601 ----- .../models/ModelContainer.java | 106 + .../models/ModelContainerResource.java | 161 ++ ...elContainerResourceArmPaginatedResult.java | 84 + .../models/ModelContainers.java | 147 ++ .../models/ModelDataCollection.java | 76 - .../models/ModelDockerSection.java | 107 - .../ModelDockerSectionBaseImageRegistry.java | 46 - .../models/ModelDockerSectionResponse.java | 108 - .../models/ModelEnvironmentDefinition.java | 248 -- .../ModelEnvironmentDefinitionDocker.java | 47 - .../ModelEnvironmentDefinitionPython.java | 53 - .../models/ModelEnvironmentDefinitionR.java | 82 - .../ModelEnvironmentDefinitionResponse.java | 248 -- ...elEnvironmentDefinitionResponseDocker.java | 47 - ...elEnvironmentDefinitionResponsePython.java | 53 - .../ModelEnvironmentDefinitionResponseR.java | 82 - ...delEnvironmentDefinitionResponseSpark.java | 47 - .../ModelEnvironmentDefinitionSpark.java | 47 - .../models/ModelPythonSection.java | 135 - .../models/ModelSparkSection.java | 106 - .../models/ModelVersion.java | 226 ++ .../models/ModelVersionResource.java | 161 ++ ...odelVersionResourceArmPaginatedResult.java | 84 + ...arningServices.java => ModelVersions.java} | 121 +- .../machinelearningservices/models/Mpi.java | 56 + .../models/NodeStateCounts.java | 27 +- .../models/NoneDatastoreCredentials.java | 59 + ...estKeys.java => NoneDatastoreSecrets.java} | 25 +- .../models/Notebooks.java | 54 - .../models/Objective.java | 85 + .../models/OnlineDeployment.java | 333 +++ .../OnlineDeploymentTrackedResource.java | 317 +++ ...mentTrackedResourceArmPaginatedResult.java | 86 + .../models/OnlineDeployments.java | 203 ++ ...nlineDeploymentsCreateOrUpdateHeaders.java | 77 + ...lineDeploymentsCreateOrUpdateResponse.java | 38 + .../OnlineDeploymentsDeleteHeaders.java | 103 + ...a => OnlineDeploymentsDeleteResponse.java} | 11 +- .../OnlineDeploymentsUpdateHeaders.java | 103 + .../OnlineDeploymentsUpdateResponse.java | 38 + .../models/OnlineEndpoint.java | 82 + .../models/OnlineEndpointTrackedResource.java | 354 +++ ...ointTrackedResourceArmPaginatedResult.java | 85 + .../models/OnlineEndpoints.java | 250 ++ .../OnlineEndpointsCreateOrUpdateHeaders.java | 77 + ...OnlineEndpointsCreateOrUpdateResponse.java | 38 + .../models/OnlineEndpointsDeleteHeaders.java | 103 + .../models/OnlineEndpointsDeleteResponse.java | 26 + .../OnlineEndpointsRegenerateKeysHeaders.java | 76 + ...OnlineEndpointsRegenerateKeysResponse.java | 31 + .../models/OnlineEndpointsUpdateHeaders.java | 103 + .../models/OnlineEndpointsUpdateResponse.java | 38 + .../models/OnlineRequestSettings.java | 106 + .../models/OnlineScaleSettings.java | 89 + .../models/OperatingSystemType.java | 34 + .../models/OriginType.java | 31 + .../models/OutputDataBinding.java | 128 + .../models/OutputPathAssetReference.java | 82 + .../models/PaginatedServiceList.java | 61 - .../models/PartialAksOnlineDeployment.java | 91 + .../models/PartialBatchDeployment.java | 50 + ...BatchDeploymentPartialTrackedResource.java | 167 ++ .../models/PartialBatchEndpoint.java | 53 + ...alBatchEndpointPartialTrackedResource.java | 166 ++ .../PartialManagedOnlineDeployment.java | 87 + .../models/PartialOnlineDeployment.java | 150 ++ ...nlineDeploymentPartialTrackedResource.java | 167 ++ .../models/PartialOnlineEndpoint.java | 53 + ...lOnlineEndpointPartialTrackedResource.java | 166 ++ .../models/PrivateEndpointConnection.java | 192 +- .../PrivateEndpointConnectionListResult.java | 55 + .../models/PrivateEndpointConnections.java | 34 +- .../models/PrivateLinkResource.java | 144 +- .../models/PrivateLinkResources.java | 8 +- .../models/ProbeSettings.java | 155 ++ .../models/ProgressMetrics.java | 86 + .../models/ProvisioningStatus.java | 37 + .../models/PyTorch.java | 56 + .../models/QuotaBaseProperties.java | 6 +- .../models/RCranPackage.java | 76 - .../models/RGitHubPackage.java | 76 - .../models/RGitHubPackageResponse.java | 50 - .../models/RSection.java | 242 -- .../models/RSectionResponse.java | 242 -- .../models/Recurrence.java | 157 ++ .../models/RecurrenceFrequency.java | 52 + .../models/RecurrenceSchedule.java | 103 + .../models/ReferenceType.java | 37 + .../models/RegenerateEndpointKeysRequest.java | 82 + .../models/ResourceIdentity.java | 122 + .../models/ResourceIdentityAssignment.java | 41 + .../models/ResourceQuota.java | 2 +- .../machinelearningservices/models/Route.java | 80 + .../models/SamplingAlgorithm.java | 37 + .../models/SasDatastoreCredentials.java | 59 + .../models/SasDatastoreSecrets.java | 57 + .../models/ScaleType.java | 34 + .../models/ScheduleStatus.java | 34 + .../models/SecretsType.java | 46 + .../ServicePrincipalDatastoreCredentials.java | 176 ++ .../ServicePrincipalDatastoreSecrets.java | 57 + .../models/ServiceResource.java | 312 --- .../models/ServiceResponseBase.java | 178 -- .../models/ServiceResponseBaseError.java | 24 - .../models/SparkMavenPackage.java | 102 - .../models/SqlAdminDatastoreCredentials.java | 91 + .../models/SqlAdminDatastoreSecrets.java | 57 + .../models/StatusMessage.java | 85 + .../models/StatusMessageLevel.java | 37 + .../models/StorageAccounts.java | 33 - .../models/SweepJob.java | 452 ++++ .../models/TensorFlow.java | 82 + .../models/TextAnnotationType.java | 31 + .../models/TrialComponent.java | 273 ++ .../models/TriggerType.java | 34 + .../models/TruncationSelectionPolicy.java | 70 + .../models/UpdateWorkspaceQuotas.java | 12 +- .../models/UserAccountCredentials.java | 22 +- .../models/UserAssignedIdentityMeta.java | 83 + .../models/VariantType.java | 34 - .../models/VirtualMachineSize.java | 44 +- .../models/VirtualMachineSizeListResult.java | 6 +- .../models/VnetConfiguration.java | 76 - .../models/WebServiceState.java | 43 - .../models/Workspace.java | 192 +- .../models/WorkspaceConnection.java | 15 +- .../models/WorkspaceConnectionDto.java | 182 -- .../models/WorkspaceConnections.java | 12 +- .../models/WorkspaceFeatures.java | 4 +- ...paceOperations.java => WorkspaceSkus.java} | 8 +- .../models/WorkspaceUpdateParameters.java | 2 + .../models/Workspaces.java | 89 +- 463 files changed, 56482 insertions(+), 12642 deletions(-) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/BatchDeploymentsClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/BatchEndpointsClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/CodeContainersClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/CodeVersionsClient.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/{MachineLearningComputesClient.java => ComputesClient.java} (84%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DataContainersClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DataVersionsClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DatastoresClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/EnvironmentContainersClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/EnvironmentSpecificationVersionsClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/JobsClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/LabelingJobsClient.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningServicesClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ModelContainersClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ModelVersionsClient.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/NotebooksClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OnlineDeploymentsClient.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OnlineEndpointsClient.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/StorageAccountsClient.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/{WorkspaceOperationsClient.java => WorkspaceSkusClient.java} (87%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchDeploymentTrackedResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchEndpointInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchEndpointTrackedResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/CodeContainerResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/CodeVersionResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DataContainerResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DataVersionResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DatastorePropertiesResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DatastoreSecretsInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DeploymentLogsInner.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/{models/AuthKeys.java => fluent/models/EndpointAuthKeysInner.java} (78%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EndpointAuthTokenInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EnvironmentContainerResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EnvironmentSpecificationVersionResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ExportSummaryInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/JobBaseResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/LabelingJobResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ModelContainerResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ModelVersionResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineDeploymentTrackedResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineEndpointInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineEndpointTrackedResourceInner.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ServiceResourceInner.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentTrackedResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentsImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointTrackedResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointsImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainerResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainersClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainersImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionsImpl.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/{MachineLearningComputesClientImpl.java => ComputesClientImpl.java} (86%) rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/{MachineLearningComputesImpl.java => ComputesImpl.java} (87%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainerResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainersClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainersImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionsImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastorePropertiesResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoreSecretsImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoresClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoresImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DeploymentLogsImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EndpointAuthKeysImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EndpointAuthTokenImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainerResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainersClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainersImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionsImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ExportSummaryImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobBaseResourceImpl.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/{MachineLearningServicesClientImpl.java => JobsClientImpl.java} (56%) rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/{MachineLearningServicesImpl.java => JobsImpl.java} (58%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobsImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainerResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainersClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainersImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionsImpl.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksClientImpl.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentTrackedResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentsImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointTrackedResourceImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointsClientImpl.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointsImpl.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ServiceResourceImpl.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsClientImpl.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsImpl.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/{WorkspaceOperationsClientImpl.java => WorkspaceSkusClientImpl.java} (84%) rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/{WorkspaceOperationsImpl.java => WorkspaceSkusImpl.java} (75%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AccountKeyDatastoreCredentials.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AccountKeyDatastoreSecrets.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequest.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestDataCollection.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestEncryptionProperties.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestVnetConfiguration.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponse.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseDataCollection.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEncryptionProperties.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEnvironmentImageRequest.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseVnetConfiguration.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatus.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatusError.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequest.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestAutoScaler.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestDataCollection.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestLivenessProbeRequirements.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponse.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseAutoScaler.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDataCollection.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDeploymentStatus.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseEnvironmentImageRequest.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseLivenessProbeRequirements.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksVariantResponse.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{ModelDockerSectionResponseBaseImageRegistry.java => AmlToken.java} (62%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AssetReferenceBase.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaleSettings.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaler.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureBlobContents.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureDataLakeGen1Contents.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureDataLakeGen2Contents.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureFileContents.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzurePostgreSqlContents.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureSqlDatabaseContents.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BanditPolicy.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BaseComputeResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeployment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeploymentTrackedResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeploymentTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeployments.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpoint.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpointTrackedResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpointTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpoints.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchLoggingLevel.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchOutputAction.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchOutputConfiguration.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchRetrySettings.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CertificateDatastoreCredentials.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CertificateDatastoreSecrets.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CocoExportSummary.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeConfiguration.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainer.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainerResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainerResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainers.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersion.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersionResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersionResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersions.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CommandJob.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeConfiguration.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeEnvironmentType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputePowerAction.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeSchedules.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeStartStopSchedule.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{MachineLearningComputes.java => Computes.java} (78%) rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{MachineLearningServicesCreateOrUpdateHeaders.java => ComputesCreateOrUpdateHeaders.java} (73%) rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{MachineLearningComputesCreateOrUpdateResponse.java => ComputesCreateOrUpdateResponse.java} (71%) rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{MachineLearningComputesDeleteHeaders.java => ComputesDeleteHeaders.java} (78%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesDeleteResponse.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistry.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContentsType.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateEndpointVariantRequest.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequest.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestEnvironmentImageRequest.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CredentialsType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Cron.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CsvExportSummary.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataBindingMode.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainer.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainerResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainerResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainers.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataPathAssetReference.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersion.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersionResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersionResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersions.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetExportSummary.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetReference.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreContents.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreCredentials.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreProperties.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastorePropertiesResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastorePropertiesResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreSecrets.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Datastores.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DaysOfWeek.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentLogs.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentLogsRequest.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentProvisioningState.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DistributionConfiguration.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DistributionType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerBuild.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerImage.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerImagePlatform.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerSpecification.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerSpecificationType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EarlyTerminationPolicy.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EarlyTerminationPolicyType.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperties.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthKeys.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthMode.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthToken.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointComputeType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointProvisioningState.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainer.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainerResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainerResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainers.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequest.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironment.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironmentReference.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponse.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironment.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironmentReference.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentReference.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersion.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersionResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersionResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersions.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ExportFormatType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ExportSummary.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/FlavorData.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/GlusterFsContents.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Goal.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdAssetReference.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityConfiguration.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityConfigurationType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAnnotationType.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAsset.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/InferenceContainerProperties.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/InputDataBinding.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBase.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBaseResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBaseResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobEndpoint.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobOutput.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobProvisioningState.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobStatus.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Jobs.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobsDeleteHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobsDeleteResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/K8SOnlineDeployment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/KeyType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelCategory.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelClass.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingDatasetConfiguration.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJob.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobImageProperties.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{ContainerRegistryResponse.java => LabelingJobInstructions.java} (51%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobMediaProperties.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobTextProperties.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobs.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsCreateOrUpdateHeaders.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{MachineLearningServicesCreateOrUpdateResponse.java => LabelingJobsCreateOrUpdateResponse.java} (64%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsExportLabelsHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsExportLabelsResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsResumeHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsResumeResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LinkedInfo.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LivenessProbeRequirements.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MLAssistConfiguration.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManagedIdentity.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManagedOnlineDeployment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManualScaleSettings.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MediaType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MedianStoppingPolicy.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Model.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainer.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainerResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainerResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainers.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDataCollection.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSection.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionBaseImageRegistry.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponse.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinition.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionDocker.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionPython.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionR.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponse.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseDocker.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponsePython.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseR.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseSpark.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionSpark.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelPythonSection.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelSparkSection.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersion.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersionResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersionResourceArmPaginatedResult.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{MachineLearningServices.java => ModelVersions.java} (59%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Mpi.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NoneDatastoreCredentials.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{CreateServiceRequestKeys.java => NoneDatastoreSecrets.java} (56%) delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Notebooks.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Objective.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeployment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentTrackedResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeployments.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsCreateOrUpdateHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsCreateOrUpdateResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsDeleteHeaders.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{MachineLearningComputesDeleteResponse.java => OnlineDeploymentsDeleteResponse.java} (68%) create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsUpdateHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsUpdateResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpoint.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointTrackedResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpoints.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsCreateOrUpdateHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsCreateOrUpdateResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsDeleteHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsDeleteResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsRegenerateKeysHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsRegenerateKeysResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsUpdateHeaders.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsUpdateResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineRequestSettings.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineScaleSettings.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperatingSystemType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OriginType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OutputDataBinding.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OutputPathAssetReference.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedServiceList.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialAksOnlineDeployment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchDeployment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchDeploymentPartialTrackedResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchEndpoint.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchEndpointPartialTrackedResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialManagedOnlineDeployment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineDeployment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineDeploymentPartialTrackedResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineEndpoint.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineEndpointPartialTrackedResource.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProbeSettings.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProgressMetrics.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProvisioningStatus.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PyTorch.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RCranPackage.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackage.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackageResponse.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSection.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSectionResponse.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Recurrence.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RecurrenceFrequency.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RecurrenceSchedule.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ReferenceType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RegenerateEndpointKeysRequest.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentity.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentityAssignment.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Route.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SamplingAlgorithm.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SasDatastoreCredentials.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SasDatastoreSecrets.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScaleType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScheduleStatus.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SecretsType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServicePrincipalDatastoreCredentials.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServicePrincipalDatastoreSecrets.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResource.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBase.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBaseError.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SparkMavenPackage.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SqlAdminDatastoreCredentials.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SqlAdminDatastoreSecrets.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StatusMessage.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StatusMessageLevel.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StorageAccounts.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SweepJob.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TensorFlow.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TextAnnotationType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TrialComponent.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TriggerType.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TruncationSelectionPolicy.java create mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAssignedIdentityMeta.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VariantType.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VnetConfiguration.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WebServiceState.java delete mode 100644 sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnectionDto.java rename sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/{WorkspaceOperations.java => WorkspaceSkus.java} (85%) diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/CHANGELOG.md b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/CHANGELOG.md index 41c62a9ca98f..ecaef53cecc3 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/CHANGELOG.md +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-08-17) +- Azure Resource Manager MachineLearningServices client library for Java. This package contains Microsoft Azure SDK for MachineLearningServices Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2021-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-16) diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/README.md b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/README.md index fd63ec9be8f7..074bac0c8987 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/README.md +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/README.md @@ -2,7 +2,7 @@ Azure Resource Manager MachineLearningServices client library for Java. -This package contains Microsoft Azure SDK for MachineLearningServices Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2021-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for MachineLearningServices Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2021-03-01-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 @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-machinelearningservices - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,8 @@ See [API design][design] for general introduction on design and key concepts on ## Examples + + ## Troubleshooting ## Next steps diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml index ff8afab05987..4d2008c725da 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/pom.xml @@ -1,67 +1,86 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-machinelearningservices - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-machinelearningservices + 1.0.0-beta.2 + jar - Microsoft Azure SDK for MachineLearningServices Management - This package contains Microsoft Azure SDK for MachineLearningServices 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-2021-04-01. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for MachineLearningServices Management + This package contains Microsoft Azure SDK for MachineLearningServices 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-2021-03-01-preview. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - - - - - com.azure - azure-core - 1.19.0 - - - com.azure - azure-core-management - 1.4.0 - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.5 - - true - - - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + + + + + com.azure + azure-core + 1.19.0 + + + com.azure + azure-core-management + 1.4.0 + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + true + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + + + + java.method.addedToInterface + + + true + .* + com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)* + + + + + + + diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/MachineLearningServicesManager.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/MachineLearningServicesManager.java index 1c9aaf51e0be..5e1f2a16dc50 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/MachineLearningServicesManager.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/MachineLearningServicesManager.java @@ -9,7 +9,6 @@ import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; -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; @@ -17,38 +16,63 @@ import com.azure.core.http.policy.RequestIdPolicy; 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.logging.ClientLogger; import com.azure.resourcemanager.machinelearningservices.fluent.AzureMachineLearningWorkspaces; import com.azure.resourcemanager.machinelearningservices.implementation.AzureMachineLearningWorkspacesBuilder; -import com.azure.resourcemanager.machinelearningservices.implementation.MachineLearningComputesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.MachineLearningServicesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.NotebooksImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.BatchDeploymentsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.BatchEndpointsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.CodeContainersImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.CodeVersionsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.ComputesImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.DataContainersImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.DataVersionsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.DatastoresImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.EnvironmentContainersImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.EnvironmentSpecificationVersionsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.JobsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.LabelingJobsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.ModelContainersImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.ModelVersionsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.OnlineDeploymentsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.OnlineEndpointsImpl; import com.azure.resourcemanager.machinelearningservices.implementation.OperationsImpl; import com.azure.resourcemanager.machinelearningservices.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.machinelearningservices.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.machinelearningservices.implementation.QuotasImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.StorageAccountsImpl; import com.azure.resourcemanager.machinelearningservices.implementation.UsagesImpl; import com.azure.resourcemanager.machinelearningservices.implementation.VirtualMachineSizesImpl; import com.azure.resourcemanager.machinelearningservices.implementation.WorkspaceConnectionsImpl; import com.azure.resourcemanager.machinelearningservices.implementation.WorkspaceFeaturesImpl; -import com.azure.resourcemanager.machinelearningservices.implementation.WorkspaceOperationsImpl; +import com.azure.resourcemanager.machinelearningservices.implementation.WorkspaceSkusImpl; import com.azure.resourcemanager.machinelearningservices.implementation.WorkspacesImpl; -import com.azure.resourcemanager.machinelearningservices.models.MachineLearningComputes; -import com.azure.resourcemanager.machinelearningservices.models.MachineLearningServices; -import com.azure.resourcemanager.machinelearningservices.models.Notebooks; +import com.azure.resourcemanager.machinelearningservices.models.BatchDeployments; +import com.azure.resourcemanager.machinelearningservices.models.BatchEndpoints; +import com.azure.resourcemanager.machinelearningservices.models.CodeContainers; +import com.azure.resourcemanager.machinelearningservices.models.CodeVersions; +import com.azure.resourcemanager.machinelearningservices.models.Computes; +import com.azure.resourcemanager.machinelearningservices.models.DataContainers; +import com.azure.resourcemanager.machinelearningservices.models.DataVersions; +import com.azure.resourcemanager.machinelearningservices.models.Datastores; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentContainers; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentSpecificationVersions; +import com.azure.resourcemanager.machinelearningservices.models.Jobs; +import com.azure.resourcemanager.machinelearningservices.models.LabelingJobs; +import com.azure.resourcemanager.machinelearningservices.models.ModelContainers; +import com.azure.resourcemanager.machinelearningservices.models.ModelVersions; +import com.azure.resourcemanager.machinelearningservices.models.OnlineDeployments; +import com.azure.resourcemanager.machinelearningservices.models.OnlineEndpoints; import com.azure.resourcemanager.machinelearningservices.models.Operations; import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnections; import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkResources; import com.azure.resourcemanager.machinelearningservices.models.Quotas; -import com.azure.resourcemanager.machinelearningservices.models.StorageAccounts; import com.azure.resourcemanager.machinelearningservices.models.Usages; import com.azure.resourcemanager.machinelearningservices.models.VirtualMachineSizes; import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnections; import com.azure.resourcemanager.machinelearningservices.models.WorkspaceFeatures; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceOperations; +import com.azure.resourcemanager.machinelearningservices.models.WorkspaceSkus; import com.azure.resourcemanager.machinelearningservices.models.Workspaces; import java.time.Duration; import java.time.temporal.ChronoUnit; @@ -65,29 +89,53 @@ public final class MachineLearningServicesManager { private Workspaces workspaces; - private WorkspaceFeatures workspaceFeatures; - private Usages usages; private VirtualMachineSizes virtualMachineSizes; private Quotas quotas; - private MachineLearningComputes machineLearningComputes; - - private WorkspaceOperations workspaceOperations; + private Computes computes; private PrivateEndpointConnections privateEndpointConnections; private PrivateLinkResources privateLinkResources; - private MachineLearningServices machineLearningServices; + private WorkspaceConnections workspaceConnections; - private Notebooks notebooks; + private BatchEndpoints batchEndpoints; - private StorageAccounts storageAccounts; + private BatchDeployments batchDeployments; - private WorkspaceConnections workspaceConnections; + private CodeContainers codeContainers; + + private CodeVersions codeVersions; + + private DataContainers dataContainers; + + private DataVersions dataVersions; + + private Datastores datastores; + + private EnvironmentContainers environmentContainers; + + private EnvironmentSpecificationVersions environmentSpecificationVersions; + + private Jobs jobs; + + private LabelingJobs labelingJobs; + + private ModelContainers modelContainers; + + private ModelVersions modelVersions; + + private OnlineEndpoints onlineEndpoints; + + private OnlineDeployments onlineDeployments; + + private WorkspaceFeatures workspaceFeatures; + + private WorkspaceSkus workspaceSkus; private final AzureMachineLearningWorkspaces clientObject; @@ -134,6 +182,7 @@ public static final class Configurable { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -173,6 +222,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -229,6 +289,9 @@ public MachineLearningServicesManager authenticate(TokenCredential credential, A userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } @@ -238,10 +301,7 @@ public MachineLearningServicesManager authenticate(TokenCredential credential, A HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); @@ -270,14 +330,6 @@ public Workspaces workspaces() { return workspaces; } - /** @return Resource collection API of WorkspaceFeatures. */ - public WorkspaceFeatures workspaceFeatures() { - if (this.workspaceFeatures == null) { - this.workspaceFeatures = new WorkspaceFeaturesImpl(clientObject.getWorkspaceFeatures(), this); - } - return workspaceFeatures; - } - /** @return Resource collection API of Usages. */ public Usages usages() { if (this.usages == null) { @@ -302,21 +354,12 @@ public Quotas quotas() { return quotas; } - /** @return Resource collection API of MachineLearningComputes. */ - public MachineLearningComputes machineLearningComputes() { - if (this.machineLearningComputes == null) { - this.machineLearningComputes = - new MachineLearningComputesImpl(clientObject.getMachineLearningComputes(), this); + /** @return Resource collection API of Computes. */ + public Computes computes() { + if (this.computes == null) { + this.computes = new ComputesImpl(clientObject.getComputes(), this); } - return machineLearningComputes; - } - - /** @return Resource collection API of WorkspaceOperations. */ - public WorkspaceOperations workspaceOperations() { - if (this.workspaceOperations == null) { - this.workspaceOperations = new WorkspaceOperationsImpl(clientObject.getWorkspaceOperations(), this); - } - return workspaceOperations; + return computes; } /** @return Resource collection API of PrivateEndpointConnections. */ @@ -336,37 +379,149 @@ public PrivateLinkResources privateLinkResources() { return privateLinkResources; } - /** @return Resource collection API of MachineLearningServices. */ - public MachineLearningServices machineLearningServices() { - if (this.machineLearningServices == null) { - this.machineLearningServices = - new MachineLearningServicesImpl(clientObject.getMachineLearningServices(), this); + /** @return Resource collection API of WorkspaceConnections. */ + public WorkspaceConnections workspaceConnections() { + if (this.workspaceConnections == null) { + this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); } - return machineLearningServices; + return workspaceConnections; } - /** @return Resource collection API of Notebooks. */ - public Notebooks notebooks() { - if (this.notebooks == null) { - this.notebooks = new NotebooksImpl(clientObject.getNotebooks(), this); + /** @return Resource collection API of BatchEndpoints. */ + public BatchEndpoints batchEndpoints() { + if (this.batchEndpoints == null) { + this.batchEndpoints = new BatchEndpointsImpl(clientObject.getBatchEndpoints(), this); } - return notebooks; + return batchEndpoints; } - /** @return Resource collection API of StorageAccounts. */ - public StorageAccounts storageAccounts() { - if (this.storageAccounts == null) { - this.storageAccounts = new StorageAccountsImpl(clientObject.getStorageAccounts(), this); + /** @return Resource collection API of BatchDeployments. */ + public BatchDeployments batchDeployments() { + if (this.batchDeployments == null) { + this.batchDeployments = new BatchDeploymentsImpl(clientObject.getBatchDeployments(), this); } - return storageAccounts; + return batchDeployments; } - /** @return Resource collection API of WorkspaceConnections. */ - public WorkspaceConnections workspaceConnections() { - if (this.workspaceConnections == null) { - this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); + /** @return Resource collection API of CodeContainers. */ + public CodeContainers codeContainers() { + if (this.codeContainers == null) { + this.codeContainers = new CodeContainersImpl(clientObject.getCodeContainers(), this); } - return workspaceConnections; + return codeContainers; + } + + /** @return Resource collection API of CodeVersions. */ + public CodeVersions codeVersions() { + if (this.codeVersions == null) { + this.codeVersions = new CodeVersionsImpl(clientObject.getCodeVersions(), this); + } + return codeVersions; + } + + /** @return Resource collection API of DataContainers. */ + public DataContainers dataContainers() { + if (this.dataContainers == null) { + this.dataContainers = new DataContainersImpl(clientObject.getDataContainers(), this); + } + return dataContainers; + } + + /** @return Resource collection API of DataVersions. */ + public DataVersions dataVersions() { + if (this.dataVersions == null) { + this.dataVersions = new DataVersionsImpl(clientObject.getDataVersions(), this); + } + return dataVersions; + } + + /** @return Resource collection API of Datastores. */ + public Datastores datastores() { + if (this.datastores == null) { + this.datastores = new DatastoresImpl(clientObject.getDatastores(), this); + } + return datastores; + } + + /** @return Resource collection API of EnvironmentContainers. */ + public EnvironmentContainers environmentContainers() { + if (this.environmentContainers == null) { + this.environmentContainers = new EnvironmentContainersImpl(clientObject.getEnvironmentContainers(), this); + } + return environmentContainers; + } + + /** @return Resource collection API of EnvironmentSpecificationVersions. */ + public EnvironmentSpecificationVersions environmentSpecificationVersions() { + if (this.environmentSpecificationVersions == null) { + this.environmentSpecificationVersions = + new EnvironmentSpecificationVersionsImpl(clientObject.getEnvironmentSpecificationVersions(), this); + } + return environmentSpecificationVersions; + } + + /** @return Resource collection API of Jobs. */ + public Jobs jobs() { + if (this.jobs == null) { + this.jobs = new JobsImpl(clientObject.getJobs(), this); + } + return jobs; + } + + /** @return Resource collection API of LabelingJobs. */ + public LabelingJobs labelingJobs() { + if (this.labelingJobs == null) { + this.labelingJobs = new LabelingJobsImpl(clientObject.getLabelingJobs(), this); + } + return labelingJobs; + } + + /** @return Resource collection API of ModelContainers. */ + public ModelContainers modelContainers() { + if (this.modelContainers == null) { + this.modelContainers = new ModelContainersImpl(clientObject.getModelContainers(), this); + } + return modelContainers; + } + + /** @return Resource collection API of ModelVersions. */ + public ModelVersions modelVersions() { + if (this.modelVersions == null) { + this.modelVersions = new ModelVersionsImpl(clientObject.getModelVersions(), this); + } + return modelVersions; + } + + /** @return Resource collection API of OnlineEndpoints. */ + public OnlineEndpoints onlineEndpoints() { + if (this.onlineEndpoints == null) { + this.onlineEndpoints = new OnlineEndpointsImpl(clientObject.getOnlineEndpoints(), this); + } + return onlineEndpoints; + } + + /** @return Resource collection API of OnlineDeployments. */ + public OnlineDeployments onlineDeployments() { + if (this.onlineDeployments == null) { + this.onlineDeployments = new OnlineDeploymentsImpl(clientObject.getOnlineDeployments(), this); + } + return onlineDeployments; + } + + /** @return Resource collection API of WorkspaceFeatures. */ + public WorkspaceFeatures workspaceFeatures() { + if (this.workspaceFeatures == null) { + this.workspaceFeatures = new WorkspaceFeaturesImpl(clientObject.getWorkspaceFeatures(), this); + } + return workspaceFeatures; + } + + /** @return Resource collection API of WorkspaceSkus. */ + public WorkspaceSkus workspaceSkus() { + if (this.workspaceSkus == null) { + this.workspaceSkus = new WorkspaceSkusImpl(clientObject.getWorkspaceSkus(), this); + } + return workspaceSkus; } /** diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/AzureMachineLearningWorkspaces.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/AzureMachineLearningWorkspaces.java index af14f5759361..a6390e689d88 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/AzureMachineLearningWorkspaces.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/AzureMachineLearningWorkspaces.java @@ -10,7 +10,7 @@ /** The interface for AzureMachineLearningWorkspaces class. */ public interface AzureMachineLearningWorkspaces { /** - * Gets Azure subscription identifier. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -58,13 +58,6 @@ public interface AzureMachineLearningWorkspaces { */ WorkspacesClient getWorkspaces(); - /** - * Gets the WorkspaceFeaturesClient object to access its operations. - * - * @return the WorkspaceFeaturesClient object. - */ - WorkspaceFeaturesClient getWorkspaceFeatures(); - /** * Gets the UsagesClient object to access its operations. * @@ -87,18 +80,11 @@ public interface AzureMachineLearningWorkspaces { QuotasClient getQuotas(); /** - * Gets the MachineLearningComputesClient object to access its operations. + * Gets the ComputesClient object to access its operations. * - * @return the MachineLearningComputesClient object. + * @return the ComputesClient object. */ - MachineLearningComputesClient getMachineLearningComputes(); - - /** - * Gets the WorkspaceOperationsClient object to access its operations. - * - * @return the WorkspaceOperationsClient object. - */ - WorkspaceOperationsClient getWorkspaceOperations(); + ComputesClient getComputes(); /** * Gets the PrivateEndpointConnectionsClient object to access its operations. @@ -115,30 +101,128 @@ public interface AzureMachineLearningWorkspaces { PrivateLinkResourcesClient getPrivateLinkResources(); /** - * Gets the MachineLearningServicesClient object to access its operations. + * Gets the WorkspaceConnectionsClient object to access its operations. * - * @return the MachineLearningServicesClient object. + * @return the WorkspaceConnectionsClient object. */ - MachineLearningServicesClient getMachineLearningServices(); + WorkspaceConnectionsClient getWorkspaceConnections(); /** - * Gets the NotebooksClient object to access its operations. + * Gets the BatchEndpointsClient object to access its operations. * - * @return the NotebooksClient object. + * @return the BatchEndpointsClient object. */ - NotebooksClient getNotebooks(); + BatchEndpointsClient getBatchEndpoints(); /** - * Gets the StorageAccountsClient object to access its operations. + * Gets the BatchDeploymentsClient object to access its operations. * - * @return the StorageAccountsClient object. + * @return the BatchDeploymentsClient object. */ - StorageAccountsClient getStorageAccounts(); + BatchDeploymentsClient getBatchDeployments(); /** - * Gets the WorkspaceConnectionsClient object to access its operations. + * Gets the CodeContainersClient object to access its operations. * - * @return the WorkspaceConnectionsClient object. + * @return the CodeContainersClient object. */ - WorkspaceConnectionsClient getWorkspaceConnections(); + CodeContainersClient getCodeContainers(); + + /** + * Gets the CodeVersionsClient object to access its operations. + * + * @return the CodeVersionsClient object. + */ + CodeVersionsClient getCodeVersions(); + + /** + * Gets the DataContainersClient object to access its operations. + * + * @return the DataContainersClient object. + */ + DataContainersClient getDataContainers(); + + /** + * Gets the DataVersionsClient object to access its operations. + * + * @return the DataVersionsClient object. + */ + DataVersionsClient getDataVersions(); + + /** + * Gets the DatastoresClient object to access its operations. + * + * @return the DatastoresClient object. + */ + DatastoresClient getDatastores(); + + /** + * Gets the EnvironmentContainersClient object to access its operations. + * + * @return the EnvironmentContainersClient object. + */ + EnvironmentContainersClient getEnvironmentContainers(); + + /** + * Gets the EnvironmentSpecificationVersionsClient object to access its operations. + * + * @return the EnvironmentSpecificationVersionsClient object. + */ + EnvironmentSpecificationVersionsClient getEnvironmentSpecificationVersions(); + + /** + * Gets the JobsClient object to access its operations. + * + * @return the JobsClient object. + */ + JobsClient getJobs(); + + /** + * Gets the LabelingJobsClient object to access its operations. + * + * @return the LabelingJobsClient object. + */ + LabelingJobsClient getLabelingJobs(); + + /** + * Gets the ModelContainersClient object to access its operations. + * + * @return the ModelContainersClient object. + */ + ModelContainersClient getModelContainers(); + + /** + * Gets the ModelVersionsClient object to access its operations. + * + * @return the ModelVersionsClient object. + */ + ModelVersionsClient getModelVersions(); + + /** + * Gets the OnlineEndpointsClient object to access its operations. + * + * @return the OnlineEndpointsClient object. + */ + OnlineEndpointsClient getOnlineEndpoints(); + + /** + * Gets the OnlineDeploymentsClient object to access its operations. + * + * @return the OnlineDeploymentsClient object. + */ + OnlineDeploymentsClient getOnlineDeployments(); + + /** + * Gets the WorkspaceFeaturesClient object to access its operations. + * + * @return the WorkspaceFeaturesClient object. + */ + WorkspaceFeaturesClient getWorkspaceFeatures(); + + /** + * Gets the WorkspaceSkusClient object to access its operations. + * + * @return the WorkspaceSkusClient object. + */ + WorkspaceSkusClient getWorkspaceSkus(); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/BatchDeploymentsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/BatchDeploymentsClient.java new file mode 100644 index 000000000000..a3b899804fab --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/BatchDeploymentsClient.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.BatchDeploymentTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.PartialBatchDeploymentPartialTrackedResource; + +/** An instance of this class provides access to all the operations defined in BatchDeploymentsClient. */ +public interface BatchDeploymentsClient { + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint 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 BatchDeployment entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String endpointName, String resourceGroupName, String workspaceName); + + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 batch inference deployment by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BatchDeploymentTrackedResourceInner get( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 a batch inference deployment by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * Update a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BatchDeploymentTrackedResourceInner update( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialBatchDeploymentPartialTrackedResource body); + + /** + * Update a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialBatchDeploymentPartialTrackedResource body, + Context context); + + /** + * Creates/updates a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BatchDeploymentTrackedResourceInner createOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + BatchDeploymentTrackedResourceInner body); + + /** + * Creates/updates a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + BatchDeploymentTrackedResourceInner body, + Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/BatchEndpointsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/BatchEndpointsClient.java new file mode 100644 index 000000000000..e53291c01994 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/BatchEndpointsClient.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.BatchEndpointTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.models.PartialBatchEndpointPartialTrackedResource; + +/** An instance of this class provides access to all the operations defined in BatchEndpointsClient. */ +public interface BatchEndpointsClient { + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @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 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, Integer count, String skip, Context context); + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 batch inference endpoint by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BatchEndpointTrackedResourceInner get(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 a batch inference endpoint by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Update a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BatchEndpointTrackedResourceInner update( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialBatchEndpointPartialTrackedResource body); + + /** + * Update a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialBatchEndpointPartialTrackedResource body, + Context context); + + /** + * Creates a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BatchEndpointTrackedResourceInner createOrUpdate( + String endpointName, String resourceGroupName, String workspaceName, BatchEndpointTrackedResourceInner body); + + /** + * Creates a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String endpointName, + String resourceGroupName, + String workspaceName, + BatchEndpointTrackedResourceInner body, + Context context); + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointAuthKeysInner listKeys(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint name. + * @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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKeysWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/CodeContainersClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/CodeContainersClient.java new file mode 100644 index 000000000000..83f32aeffc6a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/CodeContainersClient.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.CodeContainerResourceInner; + +/** An instance of this class provides access to all the operations defined in CodeContainersClient. */ +public interface CodeContainersClient { + /** + * 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context); + + /** + * Delete container. + * + * @param name Container 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerResourceInner get(String name, String resourceGroupName, String workspaceName); + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + CodeContainerResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, CodeContainerResourceInner body); + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + Response createOrUpdateWithResponse( + String name, String resourceGroupName, String workspaceName, CodeContainerResourceInner body, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/CodeVersionsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/CodeVersionsClient.java new file mode 100644 index 000000000000..852ce3418515 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/CodeVersionsClient.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.CodeVersionResourceInner; + +/** An instance of this class provides access to all the operations defined in CodeVersionsClient. */ +public interface CodeVersionsClient { + /** + * List versions. + * + * @param name Container 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 CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String name, String resourceGroupName, String workspaceName); + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionResourceInner get(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + CodeVersionResourceInner createOrUpdate( + String name, String version, String resourceGroupName, String workspaceName, CodeVersionResourceInner body); + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + Response createOrUpdateWithResponse( + String name, + String version, + String resourceGroupName, + String workspaceName, + CodeVersionResourceInner body, + Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningComputesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ComputesClient.java similarity index 84% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningComputesClient.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ComputesClient.java index b07cc7e45a95..0978e50aa66a 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningComputesClient.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ComputesClient.java @@ -15,14 +15,15 @@ import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodeInformation; import com.azure.resourcemanager.machinelearningservices.models.ClusterUpdateParameters; +import com.azure.resourcemanager.machinelearningservices.models.ComputeSchedules; import com.azure.resourcemanager.machinelearningservices.models.UnderlyingResourceAction; -/** An instance of this class provides access to all the operations defined in MachineLearningComputesClient. */ -public interface MachineLearningComputesClient { +/** An instance of this class provides access to all the operations defined in ComputesClient. */ +public interface ComputesClient { /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -30,12 +31,12 @@ public interface MachineLearningComputesClient { * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -45,14 +46,14 @@ public interface MachineLearningComputesClient { * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace( + 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 Name of the resource group in which workspace is located. + * @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. @@ -67,7 +68,7 @@ PagedIterable listByWorkspace( * 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 Name of the resource group in which workspace is located. + * @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. @@ -84,7 +85,7 @@ Response getWithResponse( * 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 Name of the resource group in which workspace is located. + * @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. @@ -101,7 +102,7 @@ SyncPoller, ComputeResourceInner> beginCreateOr * 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 Name of the resource group in which workspace is located. + * @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. @@ -123,7 +124,7 @@ SyncPoller, ComputeResourceInner> beginCreateOr * 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 Name of the resource group in which workspace is located. + * @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. @@ -140,7 +141,7 @@ ComputeResourceInner createOrUpdate( * 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 Name of the resource group in which workspace is located. + * @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. @@ -162,7 +163,7 @@ ComputeResourceInner createOrUpdate( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -179,7 +180,7 @@ SyncPoller, ComputeResourceInner> beginUpdate( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -201,7 +202,7 @@ SyncPoller, ComputeResourceInner> beginUpdate( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -218,7 +219,7 @@ ComputeResourceInner update( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -239,7 +240,7 @@ ComputeResourceInner update( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -259,7 +260,7 @@ SyncPoller, Void> beginDelete( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -281,7 +282,7 @@ SyncPoller, Void> beginDelete( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -300,7 +301,7 @@ void delete( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -321,13 +322,13 @@ void delete( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 com.azure.core.management.exception.ManagementException 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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listNodes( @@ -336,14 +337,14 @@ PagedIterable listNodes( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 com.azure.core.management.exception.ManagementException 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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listNodes( @@ -352,7 +353,7 @@ PagedIterable listNodes( /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -366,7 +367,7 @@ PagedIterable listNodes( /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -382,7 +383,7 @@ Response listKeysWithResponse( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -396,7 +397,7 @@ Response listKeysWithResponse( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -412,7 +413,7 @@ SyncPoller, Void> beginStart( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -425,7 +426,7 @@ SyncPoller, Void> beginStart( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -439,7 +440,7 @@ SyncPoller, Void> beginStart( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -453,7 +454,7 @@ SyncPoller, Void> beginStart( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -469,7 +470,7 @@ SyncPoller, Void> beginStop( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -482,7 +483,7 @@ SyncPoller, Void> beginStop( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -496,7 +497,7 @@ SyncPoller, Void> beginStop( /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -509,7 +510,7 @@ SyncPoller, Void> beginStop( /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -521,4 +522,38 @@ SyncPoller, Void> beginStop( @ServiceMethod(returns = ReturnType.SINGLE) Response restartWithResponse( String resourceGroupName, String workspaceName, String computeName, Context context); + + /** + * Updates schedules 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 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void updateSchedules(String resourceGroupName, String workspaceName, String computeName); + + /** + * Updates schedules 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 computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating schedules 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSchedulesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + ComputeSchedules parameters, + Context context); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DataContainersClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DataContainersClient.java new file mode 100644 index 000000000000..21c36db09582 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DataContainersClient.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.DataContainerResourceInner; + +/** An instance of this class provides access to all the operations defined in DataContainersClient. */ +public interface DataContainersClient { + /** + * 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context); + + /** + * Delete container. + * + * @param name Container 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataContainerResourceInner get(String name, String resourceGroupName, String workspaceName); + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + DataContainerResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, DataContainerResourceInner body); + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + Response createOrUpdateWithResponse( + String name, String resourceGroupName, String workspaceName, DataContainerResourceInner body, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DataVersionsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DataVersionsClient.java new file mode 100644 index 000000000000..4ceba7c13913 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DataVersionsClient.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.DataVersionResourceInner; + +/** An instance of this class provides access to all the operations defined in DataVersionsClient. */ +public interface DataVersionsClient { + /** + * List data versions. + * + * @param name Data 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 DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String name, String resourceGroupName, String workspaceName); + + /** + * List data versions. + * + * @param name Data name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=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 paginated list of DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + String tags, + Context context); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataVersionResourceInner get(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + DataVersionResourceInner createOrUpdate( + String name, String version, String resourceGroupName, String workspaceName, DataVersionResourceInner body); + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + Response createOrUpdateWithResponse( + String name, + String version, + String resourceGroupName, + String workspaceName, + DataVersionResourceInner body, + Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DatastoresClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DatastoresClient.java new file mode 100644 index 000000000000..071c5a3d0152 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/DatastoresClient.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.DatastorePropertiesResourceInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in DatastoresClient. */ +public interface DatastoresClient { + /** + * List datastores. + * + * @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 DatastoreProperties entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List datastores. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DatastoreProperties entities. + */ + @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); + + /** + * Delete datastore. + * + * @param name Datastore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete datastore. + * + * @param name Datastore name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get datastore. + * + * @param name Datastore 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 datastore. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatastorePropertiesResourceInner get(String name, String resourceGroupName, String workspaceName); + + /** + * Get datastore. + * + * @param name Datastore name. + * @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 datastore. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Create or update datastore. + * + * @param name Datastore name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + DatastorePropertiesResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, DatastorePropertiesResourceInner body); + + /** + * Create or update datastore. + * + * @param name Datastore name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String name, + String resourceGroupName, + String workspaceName, + DatastorePropertiesResourceInner body, + Boolean skipValidation, + Context context); + + /** + * Get datastore secrets. + * + * @param name Datastore 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 datastore secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatastoreSecretsInner listSecrets(String name, String resourceGroupName, String workspaceName); + + /** + * Get datastore secrets. + * + * @param name Datastore name. + * @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 datastore secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSecretsWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/EnvironmentContainersClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/EnvironmentContainersClient.java new file mode 100644 index 000000000000..dd90dd5c065f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/EnvironmentContainersClient.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.EnvironmentContainerResourceInner; + +/** An instance of this class provides access to all the operations defined in EnvironmentContainersClient. */ +public interface EnvironmentContainersClient { + /** + * 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context); + + /** + * Delete container. + * + * @param name Container 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerResourceInner get(String name, String resourceGroupName, String workspaceName); + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + EnvironmentContainerResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, EnvironmentContainerResourceInner body); + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + Response createOrUpdateWithResponse( + String name, + String resourceGroupName, + String workspaceName, + EnvironmentContainerResourceInner body, + Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/EnvironmentSpecificationVersionsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/EnvironmentSpecificationVersionsClient.java new file mode 100644 index 000000000000..95d530076836 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/EnvironmentSpecificationVersionsClient.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.EnvironmentSpecificationVersionResourceInner; + +/** + * An instance of this class provides access to all the operations defined in EnvironmentSpecificationVersionsClient. + */ +public interface EnvironmentSpecificationVersionsClient { + /** + * List versions. + * + * @param name Container 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 EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String name, String resourceGroupName, String workspaceName); + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentSpecificationVersionResourceInner get( + String name, String version, String resourceGroupName, String workspaceName); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Creates or updates an EnvironmentSpecificationVersion. + * + * @param name Name of EnvironmentSpecificationVersion. + * @param version Version of EnvironmentSpecificationVersion. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Definition of EnvironmentSpecificationVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request 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) + EnvironmentSpecificationVersionResourceInner createOrUpdate( + String name, + String version, + String resourceGroupName, + String workspaceName, + EnvironmentSpecificationVersionResourceInner body); + + /** + * Creates or updates an EnvironmentSpecificationVersion. + * + * @param name Name of EnvironmentSpecificationVersion. + * @param version Version of EnvironmentSpecificationVersion. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Definition of EnvironmentSpecificationVersion. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request 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) + Response createOrUpdateWithResponse( + String name, + String version, + String resourceGroupName, + String workspaceName, + EnvironmentSpecificationVersionResourceInner body, + Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/JobsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/JobsClient.java new file mode 100644 index 000000000000..f637c6e1d68c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/JobsClient.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.JobBaseResourceInner; + +/** An instance of this class provides access to all the operations defined in JobsClient. */ +public interface JobsClient { + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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 skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tags Tags for job to be returned. + * @param tag Jobs returned will have this tag key. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String jobType, + String tags, + String tag, + Context context); + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete(String id, String resourceGroupName, String workspaceName); + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String id, String resourceGroupName, String workspaceName); + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a Job by name/id. + * + * @param id The name and identifier for the Job. + * @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 Job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JobBaseResourceInner get(String id, String resourceGroupName, String workspaceName); + + /** + * Gets a Job by name/id. + * + * @param id The name and identifier for the Job. + * @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 a Job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Creates and executes a Job. + * + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JobBaseResourceInner createOrUpdate( + String id, String resourceGroupName, String workspaceName, JobBaseResourceInner body); + + /** + * Creates and executes a Job. + * + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String id, String resourceGroupName, String workspaceName, JobBaseResourceInner body, Context context); + + /** + * Cancels a Job. + * + * @param id The name and identifier for the Job. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void cancel(String id, String resourceGroupName, String workspaceName); + + /** + * Cancels a Job. + * + * @param id The name and identifier for the Job. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response cancelWithResponse(String id, String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/LabelingJobsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/LabelingJobsClient.java new file mode 100644 index 000000000000..faf37afb7ccf --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/LabelingJobsClient.java @@ -0,0 +1,329 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.LabelingJobResourceInner; + +/** An instance of this class provides access to all the operations defined in LabelingJobsClient. */ +public interface LabelingJobsClient { + /** + * Lists labeling 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists labeling 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 skip Continuation token for pagination. + * @param count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context); + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String id, String resourceGroupName, String workspaceName); + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @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 labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobResourceInner get(String id, String resourceGroupName, String workspaceName); + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String id, + String resourceGroupName, + String workspaceName, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context); + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, LabelingJobResourceInner> beginCreateOrUpdate( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body); + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, LabelingJobResourceInner> beginCreateOrUpdate( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body, Context context); + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobResourceInner createOrUpdate( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body); + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobResourceInner createOrUpdate( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body, Context context); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + SyncPoller, ExportSummaryInner> beginExportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + SyncPoller, ExportSummaryInner> beginExportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ExportSummaryInner exportLabels(String id, String resourceGroupName, String workspaceName, ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + ExportSummaryInner exportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context); + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void pause(String id, String resourceGroupName, String workspaceName); + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response pauseWithResponse(String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginResume(String id, String resourceGroupName, String workspaceName); + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginResume( + String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resume(String id, String resourceGroupName, String workspaceName); + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resume(String id, String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningServicesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningServicesClient.java deleted file mode 100644 index ae52246e89b2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/MachineLearningServicesClient.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequest; -import com.azure.resourcemanager.machinelearningservices.models.OrderString; - -/** An instance of this class provides access to all the operations defined in MachineLearningServicesClient. */ -public interface MachineLearningServicesClient { - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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 services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); - - /** - * Gets services in specified workspace. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. 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 services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @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 services in specified workspace. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace( - String resourceGroupName, - String workspaceName, - String skip, - String modelId, - String modelName, - String tag, - String tags, - String properties, - String runId, - Boolean expand, - OrderString orderby, - Context context); - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServiceResourceInner get(String resourceGroupName, String workspaceName, String serviceName); - - /** - * Get a Service by name. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String serviceName, Boolean expand, Context context); - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 serviceName); - - /** - * Delete a specific Service.. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String serviceName, Context context); - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ServiceResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties); - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ServiceResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String serviceName, - CreateServiceRequest properties, - Context context); - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServiceResourceInner createOrUpdate( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties); - - /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 service object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServiceResourceInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String serviceName, - CreateServiceRequest properties, - Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ModelContainersClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ModelContainersClient.java new file mode 100644 index 000000000000..adba53a84647 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ModelContainersClient.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ModelContainerResourceInner; + +/** An instance of this class provides access to all the operations defined in ModelContainersClient. */ +public interface ModelContainersClient { + /** + * List model 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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 skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context); + + /** + * Delete container. + * + * @param name Container 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerResourceInner get(String name, String resourceGroupName, String workspaceName); + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + ModelContainerResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, ModelContainerResourceInner body); + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + Response createOrUpdateWithResponse( + String name, String resourceGroupName, String workspaceName, ModelContainerResourceInner body, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ModelVersionsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ModelVersionsClient.java new file mode 100644 index 000000000000..00606e09e56e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/ModelVersionsClient.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ModelVersionResourceInner; + +/** An instance of this class provides access to all the operations defined in ModelVersionsClient. */ +public interface ModelVersionsClient { + /** + * List model versions. + * + * @param name Model 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 ModelVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String name, String resourceGroupName, String workspaceName); + + /** + * List model versions. + * + * @param name Model name. + * @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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String skip, + String orderBy, + Integer top, + String version, + String description, + Integer offset, + String tags, + String properties, + Context context); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionResourceInner get(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + ModelVersionResourceInner createOrUpdate( + String name, String version, String resourceGroupName, String workspaceName, ModelVersionResourceInner body); + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + Response createOrUpdateWithResponse( + String name, + String version, + String resourceGroupName, + String workspaceName, + ModelVersionResourceInner body, + Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/NotebooksClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/NotebooksClient.java deleted file mode 100644 index 2e926970ec64..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/NotebooksClient.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; - -/** An instance of this class provides access to all the operations defined in NotebooksClient. */ -public interface NotebooksClient { - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - SyncPoller, NotebookResourceInfoInner> beginPrepare( - String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, NotebookResourceInfoInner> beginPrepare( - String resourceGroupName, String workspaceName, Context context); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - NotebookResourceInfoInner prepare(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookResourceInfoInner prepare(String resourceGroupName, String workspaceName, Context context); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - ListNotebookKeysResultInner listKeys(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OnlineDeploymentsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OnlineDeploymentsClient.java new file mode 100644 index 000000000000..9b5d45fc1028 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OnlineDeploymentsClient.java @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.DeploymentLogsInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DeploymentLogsRequest; +import com.azure.resourcemanager.machinelearningservices.models.PartialOnlineDeploymentPartialTrackedResource; + +/** An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. */ +public interface OnlineDeploymentsClient { + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint 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 OnlineDeployment entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String endpointName, String resourceGroupName, String workspaceName); + + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 inference Deployment Deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OnlineDeploymentTrackedResourceInner get( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 inference Deployment Deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + SyncPoller, OnlineDeploymentTrackedResourceInner> beginUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body); + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + SyncPoller, OnlineDeploymentTrackedResourceInner> beginUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body, + Context context); + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + OnlineDeploymentTrackedResourceInner update( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body); + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + OnlineDeploymentTrackedResourceInner update( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body, + Context context); + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + SyncPoller, OnlineDeploymentTrackedResourceInner> + beginCreateOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body); + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + SyncPoller, OnlineDeploymentTrackedResourceInner> + beginCreateOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body, + Context context); + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + OnlineDeploymentTrackedResourceInner createOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body); + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + OnlineDeploymentTrackedResourceInner createOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body, + Context context); + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentLogsInner getLogs( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body); + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 com.azure.core.management.exception.ManagementException thrown 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) + Response getLogsWithResponse( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body, + Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OnlineEndpointsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OnlineEndpointsClient.java new file mode 100644 index 000000000000..4ca3ec681528 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/OnlineEndpointsClient.java @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthTokenInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EndpointComputeType; +import com.azure.resourcemanager.machinelearningservices.models.OrderString; +import com.azure.resourcemanager.machinelearningservices.models.PartialOnlineEndpointPartialTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.RegenerateEndpointKeysRequest; + +/** An instance of this class provides access to all the operations defined in OnlineEndpointsClient. */ +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. + */ + @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 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + @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); + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint 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 online Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OnlineEndpointTrackedResourceInner get(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint name. + * @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 online Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + SyncPoller, OnlineEndpointTrackedResourceInner> beginUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body); + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + SyncPoller, OnlineEndpointTrackedResourceInner> beginUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body, + Context context); + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + OnlineEndpointTrackedResourceInner update( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body); + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + OnlineEndpointTrackedResourceInner update( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body, + Context context); + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + SyncPoller, OnlineEndpointTrackedResourceInner> beginCreateOrUpdate( + String endpointName, String resourceGroupName, String workspaceName, OnlineEndpointTrackedResourceInner body); + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + SyncPoller, OnlineEndpointTrackedResourceInner> beginCreateOrUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body, + Context context); + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + OnlineEndpointTrackedResourceInner createOrUpdate( + String endpointName, String resourceGroupName, String workspaceName, OnlineEndpointTrackedResourceInner body); + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + OnlineEndpointTrackedResourceInner createOrUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body, + Context context); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointAuthKeysInner listKeys(String endpointName, String resourceGroupName, String workspaceName); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint name. + * @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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKeysWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginRegenerateKeys( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginRegenerateKeys( + String endpointName, + String resourceGroupName, + String workspaceName, + RegenerateEndpointKeysRequest body, + Context context); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 regenerateKeys( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void regenerateKeys( + String endpointName, + String resourceGroupName, + String workspaceName, + RegenerateEndpointKeysRequest body, + Context context); + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint 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 service Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointAuthTokenInner getToken(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint name. + * @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 service Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getTokenWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateEndpointConnectionsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateEndpointConnectionsClient.java index 28c1ae787989..921469a96775 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateEndpointConnectionsClient.java @@ -6,16 +6,44 @@ 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.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { + /** + * List all the private endpoint connections associated with the 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 list of private endpoint connection associated with the specified workspace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List all the private endpoint connections associated with the 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 list of private endpoint connection associated with the specified workspace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); + /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -30,7 +58,7 @@ PrivateEndpointConnectionInner get( /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -46,7 +74,7 @@ Response getWithResponse( /** * Update the state of specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -56,7 +84,7 @@ Response getWithResponse( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner put( + PrivateEndpointConnectionInner createOrUpdate( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, @@ -65,7 +93,7 @@ PrivateEndpointConnectionInner put( /** * Update the state of specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -76,7 +104,7 @@ PrivateEndpointConnectionInner put( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response putWithResponse( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, @@ -86,7 +114,7 @@ Response putWithResponse( /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -99,7 +127,7 @@ Response putWithResponse( /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateLinkResourcesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateLinkResourcesClient.java index 8ab1afdbdaeb..c433852e73ee 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateLinkResourcesClient.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/PrivateLinkResourcesClient.java @@ -15,7 +15,7 @@ public interface PrivateLinkResourcesClient { /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -23,12 +23,12 @@ public interface PrivateLinkResourcesClient { * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner listByWorkspace(String resourceGroupName, String workspaceName); + PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName); /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -37,6 +37,6 @@ public interface PrivateLinkResourcesClient { * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listByWorkspaceWithResponse( + Response listWithResponse( String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/StorageAccountsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/StorageAccountsClient.java deleted file mode 100644 index 95a577f1d77d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/StorageAccountsClient.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; - -/** An instance of this class provides access to all the operations defined in StorageAccountsClient. */ -public interface StorageAccountsClient { - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - ListStorageAccountKeysResultInner listKeys(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceConnectionsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceConnectionsClient.java index e595d0c2001b..e64714d48c2f 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceConnectionsClient.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceConnectionsClient.java @@ -10,14 +10,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnectionDto; /** An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ public interface WorkspaceConnectionsClient { /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -30,7 +29,7 @@ public interface WorkspaceConnectionsClient { /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -47,7 +46,7 @@ PagedIterable list( /** * Add a new workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param parameters The object for creating or updating a new workspace connection. @@ -58,12 +57,12 @@ PagedIterable list( */ @ServiceMethod(returns = ReturnType.SINGLE) WorkspaceConnectionInner create( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionDto parameters); + String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters); /** * Add a new workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param parameters The object for creating or updating a new workspace connection. @@ -78,13 +77,13 @@ Response createWithResponse( String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionDto parameters, + WorkspaceConnectionInner parameters, Context context); /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -98,7 +97,7 @@ Response createWithResponse( /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. @@ -114,7 +113,7 @@ Response getWithResponse( /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,7 +126,7 @@ Response getWithResponse( /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceFeaturesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceFeaturesClient.java index f6451157bc19..e93a4142606b 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceFeaturesClient.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceFeaturesClient.java @@ -15,7 +15,7 @@ public interface WorkspaceFeaturesClient { /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -28,7 +28,7 @@ public interface WorkspaceFeaturesClient { /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceOperationsClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceSkusClient.java similarity index 87% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceOperationsClient.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceSkusClient.java index 6cc8f4f46345..e1182d56a0fa 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceOperationsClient.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspaceSkusClient.java @@ -10,8 +10,8 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; -/** An instance of this class provides access to all the operations defined in WorkspaceOperationsClient. */ -public interface WorkspaceOperationsClient { +/** An instance of this class provides access to all the operations defined in WorkspaceSkusClient. */ +public interface WorkspaceSkusClient { /** * Lists all skus with associated features. * @@ -20,7 +20,7 @@ public interface WorkspaceOperationsClient { * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus(); + PagedIterable list(); /** * Lists all skus with associated features. @@ -32,5 +32,5 @@ public interface WorkspaceOperationsClient { * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus(Context context); + PagedIterable list(Context context); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspacesClient.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspacesClient.java index f412c73fd058..7ab98bb94c0e 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspacesClient.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/WorkspacesClient.java @@ -11,8 +11,11 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; import com.azure.resourcemanager.machinelearningservices.models.WorkspaceUpdateParameters; @@ -21,7 +24,7 @@ public interface WorkspacesClient { /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -34,7 +37,7 @@ public interface WorkspacesClient { /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -49,7 +52,7 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -64,7 +67,7 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -80,7 +83,7 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -94,7 +97,7 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -110,7 +113,7 @@ WorkspaceInner createOrUpdate( /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -123,7 +126,7 @@ WorkspaceInner createOrUpdate( /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -137,7 +140,7 @@ WorkspaceInner createOrUpdate( /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -149,7 +152,7 @@ WorkspaceInner createOrUpdate( /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -162,7 +165,7 @@ WorkspaceInner createOrUpdate( /** * Updates a machine learning workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -176,7 +179,7 @@ WorkspaceInner createOrUpdate( /** * Updates a machine learning workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -192,7 +195,7 @@ Response updateWithResponse( /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -204,7 +207,7 @@ Response updateWithResponse( /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param skip Continuation token for pagination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,7 +222,7 @@ Response updateWithResponse( * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -233,7 +236,7 @@ Response updateWithResponse( * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -249,7 +252,7 @@ Response listKeysWithResponse( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -263,7 +266,7 @@ Response listKeysWithResponse( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -278,7 +281,7 @@ Response listKeysWithResponse( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -291,7 +294,7 @@ Response listKeysWithResponse( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -327,7 +330,7 @@ Response listKeysWithResponse( /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -340,7 +343,7 @@ Response listKeysWithResponse( /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -351,4 +354,100 @@ Response listKeysWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listNotebookAccessTokenWithResponse( String resourceGroupName, String workspaceName, Context context); + + /** + * @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) + SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( + 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( + String resourceGroupName, String workspaceName, Context context); + + /** + * @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) + NotebookResourceInfoInner prepareNotebook(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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context); + + /** + * @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) + ListStorageAccountKeysResultInner listStorageAccountKeys(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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Response listStorageAccountKeysWithResponse( + String resourceGroupName, String workspaceName, Context context); + + /** + * @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) + ListNotebookKeysResultInner listNotebookKeys(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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + Response listNotebookKeysWithResponse( + String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchDeploymentTrackedResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchDeploymentTrackedResourceInner.java new file mode 100644 index 000000000000..5d63c688e014 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchDeploymentTrackedResourceInner.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.BatchDeployment; +import com.azure.resourcemanager.machinelearningservices.models.ResourceIdentity; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The BatchDeploymentTrackedResource model. */ +@Fluent +public final class BatchDeploymentTrackedResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchDeploymentTrackedResourceInner.class); + + /* + * Service identity associated with a resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private BatchDeployment properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Service identity associated with a resource. + * + * @param identity the identity value to set. + * @return the BatchDeploymentTrackedResourceInner object itself. + */ + public BatchDeploymentTrackedResourceInner withIdentity(ResourceIdentity 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 BatchDeploymentTrackedResourceInner object itself. + */ + public BatchDeploymentTrackedResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public BatchDeployment properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the BatchDeploymentTrackedResourceInner object itself. + */ + public BatchDeploymentTrackedResourceInner withProperties(BatchDeployment properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public BatchDeploymentTrackedResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public BatchDeploymentTrackedResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model BatchDeploymentTrackedResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchEndpointInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchEndpointInner.java new file mode 100644 index 000000000000..696a597250cc --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchEndpointInner.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthMode; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Batch endpoint configuration. */ +@Fluent +public final class BatchEndpointInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchEndpointInner.class); + + /* + * Enum to determine endpoint authentication mode. + */ + @JsonProperty(value = "authMode") + private EndpointAuthMode authMode; + + /* + * Description of the inference endpoint. + */ + @JsonProperty(value = "description") + 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. + */ + @JsonProperty(value = "keys") + private EndpointAuthKeysInner keys; + + /* + * Property dictionary. Properties can be added, but not removed or + * altered. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Endpoint URI. + */ + @JsonProperty(value = "scoringUri", access = JsonProperty.Access.WRITE_ONLY) + private String scoringUri; + + /* + * Endpoint Swagger URI. + */ + @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) + private String swaggerUri; + + /* + * Traffic rules on how the traffic will be routed across deployments. + */ + @JsonProperty(value = "traffic") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map traffic; + + /** + * 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 BatchEndpointInner object itself. + */ + public BatchEndpointInner withAuthMode(EndpointAuthMode authMode) { + this.authMode = authMode; + return this; + } + + /** + * Get the description property: Description of the inference endpoint. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the inference endpoint. + * + * @param description the description value to set. + * @return the BatchEndpointInner object itself. + */ + public BatchEndpointInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get 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. + */ + public EndpointAuthKeysInner keys() { + return this.keys; + } + + /** + * Set 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. + * + * @param keys the keys value to set. + * @return the BatchEndpointInner object itself. + */ + public BatchEndpointInner withKeys(EndpointAuthKeysInner keys) { + this.keys = keys; + return this; + } + + /** + * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. + * + * @return the properties value. + */ + public Map 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 BatchEndpointInner object itself. + */ + public BatchEndpointInner withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the scoringUri property: Endpoint URI. + * + * @return the scoringUri value. + */ + public String scoringUri() { + return this.scoringUri; + } + + /** + * Get the swaggerUri property: Endpoint Swagger URI. + * + * @return the swaggerUri value. + */ + public String swaggerUri() { + return this.swaggerUri; + } + + /** + * Get the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @return the traffic value. + */ + public Map traffic() { + return this.traffic; + } + + /** + * Set the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @param traffic the traffic value to set. + * @return the BatchEndpointInner object itself. + */ + public BatchEndpointInner withTraffic(Map traffic) { + this.traffic = traffic; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keys() != null) { + keys().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchEndpointTrackedResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchEndpointTrackedResourceInner.java new file mode 100644 index 000000000000..01020c0a6b56 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/BatchEndpointTrackedResourceInner.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.ResourceIdentity; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The BatchEndpointTrackedResource model. */ +@Fluent +public final class BatchEndpointTrackedResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchEndpointTrackedResourceInner.class); + + /* + * Service identity associated with a resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private BatchEndpointInner properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Service identity associated with a resource. + * + * @param identity the identity value to set. + * @return the BatchEndpointTrackedResourceInner object itself. + */ + public BatchEndpointTrackedResourceInner withIdentity(ResourceIdentity 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 BatchEndpointTrackedResourceInner object itself. + */ + public BatchEndpointTrackedResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public BatchEndpointInner properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the BatchEndpointTrackedResourceInner object itself. + */ + public BatchEndpointTrackedResourceInner withProperties(BatchEndpointInner properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public BatchEndpointTrackedResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public BatchEndpointTrackedResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model BatchEndpointTrackedResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/CodeContainerResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/CodeContainerResourceInner.java new file mode 100644 index 000000000000..f50948022447 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/CodeContainerResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.CodeContainer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class CodeContainerResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeContainerResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private CodeContainer properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public CodeContainer properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the CodeContainerResourceInner object itself. + */ + public CodeContainerResourceInner withProperties(CodeContainer properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model CodeContainerResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/CodeVersionResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/CodeVersionResourceInner.java new file mode 100644 index 000000000000..c567ca901400 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/CodeVersionResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.CodeVersion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class CodeVersionResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeVersionResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private CodeVersion properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public CodeVersion properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the CodeVersionResourceInner object itself. + */ + public CodeVersionResourceInner withProperties(CodeVersion properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model CodeVersionResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeResourceInner.java index 30285709c715..f4f75e0d8a2a 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeResourceInner.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ComputeResourceInner.java @@ -5,33 +5,41 @@ package com.azure.resourcemanager.machinelearningservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearningservices.models.Compute; import com.azure.resourcemanager.machinelearningservices.models.Identity; import com.azure.resourcemanager.machinelearningservices.models.Sku; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Machine Learning compute object wrapped into ARM resource envelope. */ @Fluent -public final class ComputeResourceInner extends Resource { +public final class ComputeResourceInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeResourceInner.class); - /* - * Compute properties - */ - @JsonProperty(value = "properties") - private Compute properties; - /* * The identity of the resource. */ @JsonProperty(value = "identity") private Identity identity; + /* + * Specifies the location of the resource. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Contains resource tags defined as key/value pairs. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + /* * The sku of the workspace. */ @@ -39,48 +47,74 @@ public final class ComputeResourceInner extends Resource { private Sku sku; /* - * Read only system data + * Metadata pertaining to creation and last modification of the resource. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * Compute properties + */ + @JsonProperty(value = "properties") + private Compute properties; + /** - * Get the properties property: Compute properties. + * Get the identity property: The identity of the resource. * - * @return the properties value. + * @return the identity value. */ - public Compute properties() { - return this.properties; + public Identity identity() { + return this.identity; } /** - * Set the properties property: Compute properties. + * Set the identity property: The identity of the resource. * - * @param properties the properties value to set. + * @param identity the identity value to set. * @return the ComputeResourceInner object itself. */ - public ComputeResourceInner withProperties(Compute properties) { - this.properties = properties; + public ComputeResourceInner withIdentity(Identity identity) { + this.identity = identity; return this; } /** - * Get the identity property: The identity of the resource. + * Get the location property: Specifies the location of the resource. * - * @return the identity value. + * @return the location value. */ - public Identity identity() { - return this.identity; + public String location() { + return this.location; } /** - * Set the identity property: The identity of the resource. + * Set the location property: Specifies the location of the resource. * - * @param identity the identity value to set. + * @param location the location value to set. * @return the ComputeResourceInner object itself. */ - public ComputeResourceInner withIdentity(Identity identity) { - this.identity = identity; + public ComputeResourceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Contains resource tags defined as key/value pairs. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Contains resource tags defined as key/value pairs. + * + * @param tags the tags value to set. + * @return the ComputeResourceInner object itself. + */ + public ComputeResourceInner withTags(Map tags) { + this.tags = tags; return this; } @@ -105,7 +139,7 @@ public ComputeResourceInner withSku(Sku sku) { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ @@ -113,17 +147,23 @@ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ - @Override - public ComputeResourceInner withLocation(String location) { - super.withLocation(location); - return this; + /** + * Get the properties property: Compute properties. + * + * @return the properties value. + */ + public Compute properties() { + return this.properties; } - /** {@inheritDoc} */ - @Override - public ComputeResourceInner withTags(Map tags) { - super.withTags(tags); + /** + * Set the properties property: Compute properties. + * + * @param properties the properties value to set. + * @return the ComputeResourceInner object itself. + */ + public ComputeResourceInner withProperties(Compute properties) { + this.properties = properties; return this; } @@ -133,14 +173,14 @@ public ComputeResourceInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (properties() != null) { - properties().validate(); - } if (identity() != null) { identity().validate(); } if (sku() != null) { sku().validate(); } + if (properties() != null) { + properties().validate(); + } } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DataContainerResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DataContainerResourceInner.java new file mode 100644 index 000000000000..dfbb269bad36 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DataContainerResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.DataContainer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class DataContainerResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataContainerResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private DataContainer properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public DataContainer properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the DataContainerResourceInner object itself. + */ + public DataContainerResourceInner withProperties(DataContainer properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model DataContainerResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DataVersionResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DataVersionResourceInner.java new file mode 100644 index 000000000000..8f74d2a87b2e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DataVersionResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.DataVersion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class DataVersionResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataVersionResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private DataVersion properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public DataVersion properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the DataVersionResourceInner object itself. + */ + public DataVersionResourceInner withProperties(DataVersion properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model DataVersionResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DatastorePropertiesResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DatastorePropertiesResourceInner.java new file mode 100644 index 000000000000..95645a818f96 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DatastorePropertiesResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.DatastoreProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class DatastorePropertiesResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastorePropertiesResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private DatastoreProperties properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public DatastoreProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the DatastorePropertiesResourceInner object itself. + */ + public DatastorePropertiesResourceInner withProperties(DatastoreProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model DatastorePropertiesResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DatastoreSecretsInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DatastoreSecretsInner.java new file mode 100644 index 000000000000..417372c4524f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DatastoreSecretsInner.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.models.AccountKeyDatastoreSecrets; +import com.azure.resourcemanager.machinelearningservices.models.CertificateDatastoreSecrets; +import com.azure.resourcemanager.machinelearningservices.models.NoneDatastoreSecrets; +import com.azure.resourcemanager.machinelearningservices.models.SasDatastoreSecrets; +import com.azure.resourcemanager.machinelearningservices.models.ServicePrincipalDatastoreSecrets; +import com.azure.resourcemanager.machinelearningservices.models.SqlAdminDatastoreSecrets; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base definition for datastore secrets. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "secretsType", + defaultImpl = DatastoreSecretsInner.class) +@JsonTypeName("DatastoreSecrets") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AccountKey", value = AccountKeyDatastoreSecrets.class), + @JsonSubTypes.Type(name = "Certificate", value = CertificateDatastoreSecrets.class), + @JsonSubTypes.Type(name = "None", value = NoneDatastoreSecrets.class), + @JsonSubTypes.Type(name = "Sas", value = SasDatastoreSecrets.class), + @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreSecrets.class), + @JsonSubTypes.Type(name = "SqlAdmin", value = SqlAdminDatastoreSecrets.class) +}) +@Immutable +public class DatastoreSecretsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoreSecretsInner.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DeploymentLogsInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DeploymentLogsInner.java new file mode 100644 index 000000000000..777d0fb6cf00 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/DeploymentLogsInner.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeploymentLogs model. */ +@Fluent +public final class DeploymentLogsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentLogsInner.class); + + /* + * The retrieved online deployment logs. + */ + @JsonProperty(value = "content") + private String content; + + /** + * Get the content property: The retrieved online deployment logs. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Set the content property: The retrieved online deployment logs. + * + * @param content the content value to set. + * @return the DeploymentLogsInner object itself. + */ + public DeploymentLogsInner withContent(String content) { + this.content = content; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AuthKeys.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EndpointAuthKeysInner.java similarity index 78% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AuthKeys.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EndpointAuthKeysInner.java index 1182be63cd59..6af44a7a6698 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AuthKeys.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EndpointAuthKeysInner.java @@ -2,17 +2,17 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.machinelearningservices.models; +package com.azure.resourcemanager.machinelearningservices.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** The AuthKeys model. */ +/** Keys for endpoint authentication. */ @Fluent -public class AuthKeys { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthKeys.class); +public final class EndpointAuthKeysInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointAuthKeysInner.class); /* * The primary key. @@ -39,9 +39,9 @@ public String primaryKey() { * Set the primaryKey property: The primary key. * * @param primaryKey the primaryKey value to set. - * @return the AuthKeys object itself. + * @return the EndpointAuthKeysInner object itself. */ - public AuthKeys withPrimaryKey(String primaryKey) { + public EndpointAuthKeysInner withPrimaryKey(String primaryKey) { this.primaryKey = primaryKey; return this; } @@ -59,9 +59,9 @@ public String secondaryKey() { * Set the secondaryKey property: The secondary key. * * @param secondaryKey the secondaryKey value to set. - * @return the AuthKeys object itself. + * @return the EndpointAuthKeysInner object itself. */ - public AuthKeys withSecondaryKey(String secondaryKey) { + public EndpointAuthKeysInner withSecondaryKey(String secondaryKey) { this.secondaryKey = secondaryKey; return this; } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EndpointAuthTokenInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EndpointAuthTokenInner.java new file mode 100644 index 000000000000..5103812063aa --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EndpointAuthTokenInner.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Service Token. */ +@Fluent +public final class EndpointAuthTokenInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointAuthTokenInner.class); + + /* + * Access token. + */ + @JsonProperty(value = "accessToken") + private String accessToken; + + /* + * Access token expiry time (UTC). + */ + @JsonProperty(value = "expiryTimeUtc") + private Long expiryTimeUtc; + + /* + * Refresh access token after time (UTC). + */ + @JsonProperty(value = "refreshAfterTimeUtc") + private Long refreshAfterTimeUtc; + + /* + * Access token type. + */ + @JsonProperty(value = "tokenType") + private String tokenType; + + /** + * Get the accessToken property: Access token. + * + * @return the accessToken value. + */ + public String accessToken() { + return this.accessToken; + } + + /** + * Set the accessToken property: Access token. + * + * @param accessToken the accessToken value to set. + * @return the EndpointAuthTokenInner object itself. + */ + public EndpointAuthTokenInner withAccessToken(String accessToken) { + this.accessToken = accessToken; + return this; + } + + /** + * Get the expiryTimeUtc property: Access token expiry time (UTC). + * + * @return the expiryTimeUtc value. + */ + public Long expiryTimeUtc() { + return this.expiryTimeUtc; + } + + /** + * Set the expiryTimeUtc property: Access token expiry time (UTC). + * + * @param expiryTimeUtc the expiryTimeUtc value to set. + * @return the EndpointAuthTokenInner object itself. + */ + public EndpointAuthTokenInner withExpiryTimeUtc(Long expiryTimeUtc) { + this.expiryTimeUtc = expiryTimeUtc; + return this; + } + + /** + * Get the refreshAfterTimeUtc property: Refresh access token after time (UTC). + * + * @return the refreshAfterTimeUtc value. + */ + public Long refreshAfterTimeUtc() { + return this.refreshAfterTimeUtc; + } + + /** + * Set the refreshAfterTimeUtc property: Refresh access token after time (UTC). + * + * @param refreshAfterTimeUtc the refreshAfterTimeUtc value to set. + * @return the EndpointAuthTokenInner object itself. + */ + public EndpointAuthTokenInner withRefreshAfterTimeUtc(Long refreshAfterTimeUtc) { + this.refreshAfterTimeUtc = refreshAfterTimeUtc; + return this; + } + + /** + * Get the tokenType property: Access token type. + * + * @return the tokenType value. + */ + public String tokenType() { + return this.tokenType; + } + + /** + * Set the tokenType property: Access token type. + * + * @param tokenType the tokenType value to set. + * @return the EndpointAuthTokenInner object itself. + */ + public EndpointAuthTokenInner withTokenType(String tokenType) { + this.tokenType = tokenType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EnvironmentContainerResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EnvironmentContainerResourceInner.java new file mode 100644 index 000000000000..4a5af2e502ab --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EnvironmentContainerResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.EnvironmentContainer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class EnvironmentContainerResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentContainerResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private EnvironmentContainer properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public EnvironmentContainer properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the EnvironmentContainerResourceInner object itself. + */ + public EnvironmentContainerResourceInner withProperties(EnvironmentContainer properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model EnvironmentContainerResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EnvironmentSpecificationVersionResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EnvironmentSpecificationVersionResourceInner.java new file mode 100644 index 000000000000..db145c1a3ad4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/EnvironmentSpecificationVersionResourceInner.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.EnvironmentSpecificationVersion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class EnvironmentSpecificationVersionResourceInner extends ProxyResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(EnvironmentSpecificationVersionResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private EnvironmentSpecificationVersion properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public EnvironmentSpecificationVersion properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the EnvironmentSpecificationVersionResourceInner object itself. + */ + public EnvironmentSpecificationVersionResourceInner withProperties(EnvironmentSpecificationVersion properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model EnvironmentSpecificationVersionResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ExportSummaryInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ExportSummaryInner.java new file mode 100644 index 000000000000..53f034f01a81 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ExportSummaryInner.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.models.CocoExportSummary; +import com.azure.resourcemanager.machinelearningservices.models.CsvExportSummary; +import com.azure.resourcemanager.machinelearningservices.models.DatasetExportSummary; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; + +/** The ExportSummary model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "format", + defaultImpl = ExportSummaryInner.class) +@JsonTypeName("ExportSummary") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Coco", value = CocoExportSummary.class), + @JsonSubTypes.Type(name = "CSV", value = CsvExportSummary.class), + @JsonSubTypes.Type(name = "Dataset", value = DatasetExportSummary.class) +}) +@Immutable +public class ExportSummaryInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportSummaryInner.class); + + /* + * The time when the export was completed. + */ + @JsonProperty(value = "endTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endTimeUtc; + + /* + * The total number of labeled datapoints exported. + */ + @JsonProperty(value = "exportedRowCount", access = JsonProperty.Access.WRITE_ONLY) + private Long exportedRowCount; + + /* + * Name and identifier of the job containing exported labels. + */ + @JsonProperty(value = "labelingJobId", access = JsonProperty.Access.WRITE_ONLY) + private String labelingJobId; + + /* + * The time when the export was requested. + */ + @JsonProperty(value = "startTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTimeUtc; + + /** + * Get the endTimeUtc property: The time when the export was completed. + * + * @return the endTimeUtc value. + */ + public OffsetDateTime endTimeUtc() { + return this.endTimeUtc; + } + + /** + * Get the exportedRowCount property: The total number of labeled datapoints exported. + * + * @return the exportedRowCount value. + */ + public Long exportedRowCount() { + return this.exportedRowCount; + } + + /** + * Get the labelingJobId property: Name and identifier of the job containing exported labels. + * + * @return the labelingJobId value. + */ + public String labelingJobId() { + return this.labelingJobId; + } + + /** + * Get the startTimeUtc property: The time when the export was requested. + * + * @return the startTimeUtc value. + */ + public OffsetDateTime startTimeUtc() { + return this.startTimeUtc; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/JobBaseResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/JobBaseResourceInner.java new file mode 100644 index 000000000000..2f37bc36b7df --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/JobBaseResourceInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.JobBase; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class JobBaseResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JobBaseResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private JobBase properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public JobBase properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the JobBaseResourceInner object itself. + */ + public JobBaseResourceInner withProperties(JobBase properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model JobBaseResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/LabelingJobResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/LabelingJobResourceInner.java new file mode 100644 index 000000000000..96dd2ef2c441 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/LabelingJobResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.LabelingJob; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class LabelingJobResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private LabelingJob properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public LabelingJob properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the LabelingJobResourceInner object itself. + */ + public LabelingJobResourceInner withProperties(LabelingJob properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model LabelingJobResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ModelContainerResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ModelContainerResourceInner.java new file mode 100644 index 000000000000..608ccf78e4d9 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ModelContainerResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.ModelContainer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class ModelContainerResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelContainerResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private ModelContainer properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public ModelContainer properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the ModelContainerResourceInner object itself. + */ + public ModelContainerResourceInner withProperties(ModelContainer properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model ModelContainerResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ModelVersionResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ModelVersionResourceInner.java new file mode 100644 index 000000000000..e1d187f90257 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ModelVersionResourceInner.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.ModelVersion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Resource Manager resource envelope. */ +@Fluent +public final class ModelVersionResourceInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelVersionResourceInner.class); + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private ModelVersion properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public ModelVersion properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the ModelVersionResourceInner object itself. + */ + public ModelVersionResourceInner withProperties(ModelVersion properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model ModelVersionResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineDeploymentTrackedResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineDeploymentTrackedResourceInner.java new file mode 100644 index 000000000000..f37668660b32 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineDeploymentTrackedResourceInner.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.OnlineDeployment; +import com.azure.resourcemanager.machinelearningservices.models.ResourceIdentity; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The OnlineDeploymentTrackedResource model. */ +@Fluent +public final class OnlineDeploymentTrackedResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineDeploymentTrackedResourceInner.class); + + /* + * Service identity associated with a resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private OnlineDeployment properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Service identity associated with a resource. + * + * @param identity the identity value to set. + * @return the OnlineDeploymentTrackedResourceInner object itself. + */ + public OnlineDeploymentTrackedResourceInner withIdentity(ResourceIdentity 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 OnlineDeploymentTrackedResourceInner object itself. + */ + public OnlineDeploymentTrackedResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public OnlineDeployment properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the OnlineDeploymentTrackedResourceInner object itself. + */ + public OnlineDeploymentTrackedResourceInner withProperties(OnlineDeployment properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public OnlineDeploymentTrackedResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public OnlineDeploymentTrackedResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model OnlineDeploymentTrackedResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineEndpointInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineEndpointInner.java new file mode 100644 index 000000000000..9d1f02538c8d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineEndpointInner.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthMode; +import com.azure.resourcemanager.machinelearningservices.models.EndpointProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Online endpoint configuration. */ +@Fluent +public final class OnlineEndpointInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineEndpointInner.class); + + /* + * Inference endpoint authentication mode type + */ + @JsonProperty(value = "authMode", required = true) + private EndpointAuthMode authMode; + + /* + * Description of the inference endpoint. + */ + @JsonProperty(value = "description") + 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. + */ + @JsonProperty(value = "keys") + private EndpointAuthKeysInner keys; + + /* + * Property dictionary. Properties can be added, but not removed or + * altered. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * State of endpoint provisioning. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private EndpointProvisioningState provisioningState; + + /* + * Endpoint URI. + */ + @JsonProperty(value = "scoringUri", access = JsonProperty.Access.WRITE_ONLY) + private String scoringUri; + + /* + * Endpoint Swagger URI. + */ + @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) + private String swaggerUri; + + /* + * ARM resource ID of the compute if it exists. + * optional + */ + @JsonProperty(value = "target") + private String target; + + /* + * Traffic rules on how the traffic will be routed across deployments. + */ + @JsonProperty(value = "traffic") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map traffic; + + /** + * Get the authMode property: Inference endpoint authentication mode type. + * + * @return the authMode value. + */ + public EndpointAuthMode authMode() { + return this.authMode; + } + + /** + * Set the authMode property: Inference endpoint authentication mode type. + * + * @param authMode the authMode value to set. + * @return the OnlineEndpointInner object itself. + */ + public OnlineEndpointInner withAuthMode(EndpointAuthMode authMode) { + this.authMode = authMode; + return this; + } + + /** + * Get the description property: Description of the inference endpoint. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the inference endpoint. + * + * @param description the description value to set. + * @return the OnlineEndpointInner object itself. + */ + public OnlineEndpointInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get 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. + */ + public EndpointAuthKeysInner keys() { + return this.keys; + } + + /** + * Set 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. + * + * @param keys the keys value to set. + * @return the OnlineEndpointInner object itself. + */ + public OnlineEndpointInner withKeys(EndpointAuthKeysInner keys) { + this.keys = keys; + return this; + } + + /** + * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. + * + * @return the properties value. + */ + public Map 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 OnlineEndpointInner object itself. + */ + public OnlineEndpointInner withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the provisioningState property: State of endpoint provisioning. + * + * @return the provisioningState value. + */ + public EndpointProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the scoringUri property: Endpoint URI. + * + * @return the scoringUri value. + */ + public String scoringUri() { + return this.scoringUri; + } + + /** + * Get the swaggerUri property: Endpoint Swagger URI. + * + * @return the swaggerUri value. + */ + public String swaggerUri() { + return this.swaggerUri; + } + + /** + * Get the target property: ARM resource ID of the compute if it exists. optional. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: ARM resource ID of the compute if it exists. optional. + * + * @param target the target value to set. + * @return the OnlineEndpointInner object itself. + */ + public OnlineEndpointInner withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @return the traffic value. + */ + public Map traffic() { + return this.traffic; + } + + /** + * Set the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @param traffic the traffic value to set. + * @return the OnlineEndpointInner object itself. + */ + public OnlineEndpointInner withTraffic(Map traffic) { + this.traffic = traffic; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (authMode() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property authMode in model OnlineEndpointInner")); + } + if (keys() != null) { + keys().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineEndpointTrackedResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineEndpointTrackedResourceInner.java new file mode 100644 index 000000000000..73e985176621 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/OnlineEndpointTrackedResourceInner.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.ResourceIdentity; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The OnlineEndpointTrackedResource model. */ +@Fluent +public final class OnlineEndpointTrackedResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineEndpointTrackedResourceInner.class); + + /* + * Service identity associated with a resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private OnlineEndpointInner properties; + + /* + * System data associated with resource provider + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Service identity associated with a resource. + * + * @param identity the identity value to set. + * @return the OnlineEndpointTrackedResourceInner object itself. + */ + public OnlineEndpointTrackedResourceInner withIdentity(ResourceIdentity 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 OnlineEndpointTrackedResourceInner object itself. + */ + public OnlineEndpointTrackedResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public OnlineEndpointInner properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the OnlineEndpointTrackedResourceInner object itself. + */ + public OnlineEndpointTrackedResourceInner withProperties(OnlineEndpointInner properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public OnlineEndpointTrackedResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public OnlineEndpointTrackedResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property properties in model OnlineEndpointTrackedResourceInner")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateEndpointConnectionInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateEndpointConnectionInner.java index 3334cc9a86e1..98f8b03c3cab 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/PrivateEndpointConnectionInner.java @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearningservices.models.Identity; @@ -15,39 +15,34 @@ import com.azure.resourcemanager.machinelearningservices.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearningservices.models.Sku; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The Private Endpoint Connection resource. */ @JsonFlatten @Fluent -public class PrivateEndpointConnectionInner extends Resource { +public class PrivateEndpointConnectionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); /* - * The resource of private end point. - */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between - * service consumer and provider. + * The identity of the resource. */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + @JsonProperty(value = "identity") + private Identity identity; /* - * The provisioning state of the private endpoint connection resource. + * Specifies the location of the resource. */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PrivateEndpointConnectionProvisioningState provisioningState; + @JsonProperty(value = "location") + private String location; /* - * The identity of the resource. + * Contains resource tags defined as key/value pairs. */ - @JsonProperty(value = "identity") - private Identity identity; + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * The sku of the workspace. @@ -56,80 +51,87 @@ public class PrivateEndpointConnectionInner extends Resource { private Sku sku; /* - * Read only system data + * Metadata pertaining to creation and last modification of the resource. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * The resource of private end point. + */ + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The provisioning state of the private endpoint connection resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + /** - * Get the privateEndpoint property: The resource of private end point. + * Get the identity property: The identity of the resource. * - * @return the privateEndpoint value. + * @return the identity value. */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; + public Identity identity() { + return this.identity; } /** - * Set the privateEndpoint property: The resource of private end point. + * Set the identity property: The identity of the resource. * - * @param privateEndpoint the privateEndpoint value to set. + * @param identity the identity value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; + public PrivateEndpointConnectionInner withIdentity(Identity identity) { + this.identity = identity; return this; } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. + * Get the location property: Specifies the location of the resource. * - * @return the privateLinkServiceConnectionState value. + * @return the location value. */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; + public String location() { + return this.location; } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. + * Set the location property: Specifies the location of the resource. * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @param location the location value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + public PrivateEndpointConnectionInner withLocation(String location) { + this.location = location; return this; } /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the identity property: The identity of the resource. + * Get the tags property: Contains resource tags defined as key/value pairs. * - * @return the identity value. + * @return the tags value. */ - public Identity identity() { - return this.identity; + public Map tags() { + return this.tags; } /** - * Set the identity property: The identity of the resource. + * Set the tags property: Contains resource tags defined as key/value pairs. * - * @param identity the identity value to set. + * @param tags the tags value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withIdentity(Identity identity) { - this.identity = identity; + public PrivateEndpointConnectionInner withTags(Map tags) { + this.tags = tags; return this; } @@ -154,7 +156,7 @@ public PrivateEndpointConnectionInner withSku(Sku sku) { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ @@ -162,37 +164,75 @@ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ - @Override - public PrivateEndpointConnectionInner withLocation(String location) { - super.withLocation(location); + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; return this; } - /** {@inheritDoc} */ - @Override - public PrivateEndpointConnectionInner withTags(Map tags) { - super.withTags(tags); + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + 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) { - privateLinkServiceConnectionState().validate(); - } if (identity() != null) { identity().validate(); } if (sku() != null) { sku().validate(); } + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); + } } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ResourceQuotaInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ResourceQuotaInner.java index 9df00d984560..ba4a04a0620a 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ResourceQuotaInner.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ResourceQuotaInner.java @@ -41,7 +41,7 @@ public final class ResourceQuotaInner { private ResourceName name; /* - * The maximum permitted quota of the resource. + * Limit. The maximum permitted quota of the resource. */ @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) private Long limit; @@ -89,7 +89,7 @@ public ResourceName name() { } /** - * Get the limit property: The maximum permitted quota of the resource. + * Get the limit property: Limit. The maximum permitted quota of the resource. * * @return the limit value. */ diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ServiceResourceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ServiceResourceInner.java deleted file mode 100644 index 7153f64ec175..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/ServiceResourceInner.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.ServiceResponseBase; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Machine Learning service object wrapped into ARM resource envelope. */ -@Fluent -public final class ServiceResourceInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResourceInner.class); - - /* - * Service properties - */ - @JsonProperty(value = "properties") - private ServiceResponseBase properties; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private Identity identity; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Read only system data - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: Service properties. - * - * @return the properties value. - */ - public ServiceResponseBase properties() { - return this.properties; - } - - /** - * Set the properties property: Service properties. - * - * @param properties the properties value to set. - * @return the ServiceResourceInner object itself. - */ - public ServiceResourceInner withProperties(ServiceResponseBase properties) { - this.properties = properties; - return this; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the ServiceResourceInner object itself. - */ - public ServiceResourceInner withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the ServiceResourceInner object itself. - */ - public ServiceResourceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Read only system data. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ServiceResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServiceResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/VirtualMachineSizeListResultInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/VirtualMachineSizeListResultInner.java index d7b7bc81d032..f30bdec89369 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/VirtualMachineSizeListResultInner.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/VirtualMachineSizeListResultInner.java @@ -19,26 +19,26 @@ public final class VirtualMachineSizeListResultInner { /* * The list of virtual machine sizes supported by AmlCompute. */ - @JsonProperty(value = "amlCompute") - private List amlCompute; + @JsonProperty(value = "value") + private List value; /** - * Get the amlCompute property: The list of virtual machine sizes supported by AmlCompute. + * Get the value property: The list of virtual machine sizes supported by AmlCompute. * - * @return the amlCompute value. + * @return the value value. */ - public List amlCompute() { - return this.amlCompute; + public List value() { + return this.value; } /** - * Set the amlCompute property: The list of virtual machine sizes supported by AmlCompute. + * Set the value property: The list of virtual machine sizes supported by AmlCompute. * - * @param amlCompute the amlCompute value to set. + * @param value the value value to set. * @return the VirtualMachineSizeListResultInner object itself. */ - public VirtualMachineSizeListResultInner withAmlCompute(List amlCompute) { - this.amlCompute = amlCompute; + public VirtualMachineSizeListResultInner withValue(List value) { + this.value = value; return this; } @@ -48,8 +48,8 @@ public VirtualMachineSizeListResultInner withAmlCompute(List * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (amlCompute() != null) { - amlCompute().forEach(e -> e.validate()); + if (value() != null) { + value().forEach(e -> e.validate()); } } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceInner.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceInner.java index a8815c7b7bbd..6a6b5c05e3d9 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceInner.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/fluent/models/WorkspaceInner.java @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearningservices.models.EncryptionProperty; @@ -16,6 +16,7 @@ import com.azure.resourcemanager.machinelearningservices.models.SharedPrivateLinkResource; import com.azure.resourcemanager.machinelearningservices.models.Sku; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -23,9 +24,40 @@ /** An object that represents a machine learning workspace. */ @JsonFlatten @Fluent -public class WorkspaceInner extends Resource { +public class WorkspaceInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceInner.class); + /* + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + + /* + * Specifies the location of the resource. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Contains resource tags defined as key/value pairs. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The sku of the workspace. + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /* * The immutable id associated with this workspace. */ @@ -161,23 +193,94 @@ public class WorkspaceInner extends Resource { @JsonProperty(value = "properties.tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; - /* - * The identity of the resource. + /** + * Get the identity property: The identity of the resource. + * + * @return the identity value. */ - @JsonProperty(value = "identity") - private Identity identity; + public Identity identity() { + return this.identity; + } - /* - * The sku of the workspace. + /** + * Set the identity property: The identity of the resource. + * + * @param identity the identity value to set. + * @return the WorkspaceInner object itself. */ - @JsonProperty(value = "sku") - private Sku sku; + public WorkspaceInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } - /* - * Read only system data + /** + * Get the location property: Specifies the location of the resource. + * + * @return the location value. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + public String location() { + return this.location; + } + + /** + * Set the location property: Specifies the location of the resource. + * + * @param location the location value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Contains resource tags defined as key/value pairs. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Contains resource tags defined as key/value pairs. + * + * @param tags the tags value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku property: The sku of the workspace. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku of the workspace. + * + * @param sku the sku value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } /** * Get the workspaceId property: The immutable id associated with this workspace. @@ -541,75 +644,18 @@ public String tenantId() { return this.tenantId; } - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withIdentity(Identity identity) { - this.identity = identity; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Read only system data. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public WorkspaceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public WorkspaceInner withTags(Map tags) { - super.withTags(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(); + } if (encryption() != null) { encryption().validate(); } @@ -625,11 +671,5 @@ public void validate() { if (serviceManagedResourcesSettings() != null) { serviceManagedResourcesSettings().validate(); } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesBuilder.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesBuilder.java index eea90921315f..1af366c8dd9f 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesBuilder.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesBuilder.java @@ -19,12 +19,12 @@ @ServiceClientBuilder(serviceClients = {AzureMachineLearningWorkspacesImpl.class}) public final class AzureMachineLearningWorkspacesBuilder { /* - * Azure subscription identifier. + * The ID of the target subscription. */ private String subscriptionId; /** - * Sets Azure subscription identifier. + * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. * @return the AzureMachineLearningWorkspacesBuilder. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesImpl.java index 031355d5ac86..4ff1fa05f43f 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/AzureMachineLearningWorkspacesImpl.java @@ -22,19 +22,31 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.machinelearningservices.fluent.AzureMachineLearningWorkspaces; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningComputesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningServicesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.NotebooksClient; +import com.azure.resourcemanager.machinelearningservices.fluent.BatchDeploymentsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.BatchEndpointsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.CodeContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.CodeVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.ComputesClient; +import com.azure.resourcemanager.machinelearningservices.fluent.DataContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.DataVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.DatastoresClient; +import com.azure.resourcemanager.machinelearningservices.fluent.EnvironmentContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.EnvironmentSpecificationVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.JobsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.LabelingJobsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.ModelContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.ModelVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.OnlineDeploymentsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.OnlineEndpointsClient; import com.azure.resourcemanager.machinelearningservices.fluent.OperationsClient; import com.azure.resourcemanager.machinelearningservices.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.machinelearningservices.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.machinelearningservices.fluent.QuotasClient; -import com.azure.resourcemanager.machinelearningservices.fluent.StorageAccountsClient; import com.azure.resourcemanager.machinelearningservices.fluent.UsagesClient; import com.azure.resourcemanager.machinelearningservices.fluent.VirtualMachineSizesClient; import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceConnectionsClient; import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceOperationsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceSkusClient; import com.azure.resourcemanager.machinelearningservices.fluent.WorkspacesClient; import java.io.IOException; import java.lang.reflect.Type; @@ -51,11 +63,11 @@ public final class AzureMachineLearningWorkspacesImpl implements AzureMachineLearningWorkspaces { private final ClientLogger logger = new ClientLogger(AzureMachineLearningWorkspacesImpl.class); - /** Azure subscription identifier. */ + /** The ID of the target subscription. */ private final String subscriptionId; /** - * Gets Azure subscription identifier. + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -147,18 +159,6 @@ public WorkspacesClient getWorkspaces() { return this.workspaces; } - /** 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 UsagesClient object to access its operations. */ private final UsagesClient usages; @@ -195,28 +195,16 @@ public QuotasClient getQuotas() { return this.quotas; } - /** The MachineLearningComputesClient object to access its operations. */ - private final MachineLearningComputesClient machineLearningComputes; + /** The ComputesClient object to access its operations. */ + private final ComputesClient computes; /** - * Gets the MachineLearningComputesClient object to access its operations. + * Gets the ComputesClient object to access its operations. * - * @return the MachineLearningComputesClient object. + * @return the ComputesClient object. */ - public MachineLearningComputesClient getMachineLearningComputes() { - return this.machineLearningComputes; - } - - /** The WorkspaceOperationsClient object to access its operations. */ - private final WorkspaceOperationsClient workspaceOperations; - - /** - * Gets the WorkspaceOperationsClient object to access its operations. - * - * @return the WorkspaceOperationsClient object. - */ - public WorkspaceOperationsClient getWorkspaceOperations() { - return this.workspaceOperations; + public ComputesClient getComputes() { + return this.computes; } /** The PrivateEndpointConnectionsClient object to access its operations. */ @@ -243,52 +231,220 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { return this.privateLinkResources; } - /** The MachineLearningServicesClient object to access its operations. */ - private final MachineLearningServicesClient machineLearningServices; + /** The WorkspaceConnectionsClient object to access its operations. */ + private final WorkspaceConnectionsClient workspaceConnections; /** - * Gets the MachineLearningServicesClient object to access its operations. + * Gets the WorkspaceConnectionsClient object to access its operations. * - * @return the MachineLearningServicesClient object. + * @return the WorkspaceConnectionsClient object. */ - public MachineLearningServicesClient getMachineLearningServices() { - return this.machineLearningServices; + public WorkspaceConnectionsClient getWorkspaceConnections() { + return this.workspaceConnections; } - /** The NotebooksClient object to access its operations. */ - private final NotebooksClient notebooks; + /** The BatchEndpointsClient object to access its operations. */ + private final BatchEndpointsClient batchEndpoints; /** - * Gets the NotebooksClient object to access its operations. + * Gets the BatchEndpointsClient object to access its operations. * - * @return the NotebooksClient object. + * @return the BatchEndpointsClient object. */ - public NotebooksClient getNotebooks() { - return this.notebooks; + public BatchEndpointsClient getBatchEndpoints() { + return this.batchEndpoints; } - /** The StorageAccountsClient object to access its operations. */ - private final StorageAccountsClient storageAccounts; + /** The BatchDeploymentsClient object to access its operations. */ + private final BatchDeploymentsClient batchDeployments; /** - * Gets the StorageAccountsClient object to access its operations. + * Gets the BatchDeploymentsClient object to access its operations. * - * @return the StorageAccountsClient object. + * @return the BatchDeploymentsClient object. */ - public StorageAccountsClient getStorageAccounts() { - return this.storageAccounts; + public BatchDeploymentsClient getBatchDeployments() { + return this.batchDeployments; } - /** The WorkspaceConnectionsClient object to access its operations. */ - private final WorkspaceConnectionsClient workspaceConnections; + /** The CodeContainersClient object to access its operations. */ + private final CodeContainersClient codeContainers; /** - * Gets the WorkspaceConnectionsClient object to access its operations. + * Gets the CodeContainersClient object to access its operations. * - * @return the WorkspaceConnectionsClient object. + * @return the CodeContainersClient object. */ - public WorkspaceConnectionsClient getWorkspaceConnections() { - return this.workspaceConnections; + public CodeContainersClient getCodeContainers() { + return this.codeContainers; + } + + /** The CodeVersionsClient object to access its operations. */ + private final CodeVersionsClient codeVersions; + + /** + * Gets the CodeVersionsClient object to access its operations. + * + * @return the CodeVersionsClient object. + */ + public CodeVersionsClient getCodeVersions() { + return this.codeVersions; + } + + /** The DataContainersClient object to access its operations. */ + private final DataContainersClient dataContainers; + + /** + * Gets the DataContainersClient object to access its operations. + * + * @return the DataContainersClient object. + */ + public DataContainersClient getDataContainers() { + return this.dataContainers; + } + + /** The DataVersionsClient object to access its operations. */ + private final DataVersionsClient dataVersions; + + /** + * Gets the DataVersionsClient object to access its operations. + * + * @return the DataVersionsClient object. + */ + public DataVersionsClient getDataVersions() { + return this.dataVersions; + } + + /** The DatastoresClient object to access its operations. */ + private final DatastoresClient datastores; + + /** + * Gets the DatastoresClient object to access its operations. + * + * @return the DatastoresClient object. + */ + public DatastoresClient getDatastores() { + return this.datastores; + } + + /** The EnvironmentContainersClient object to access its operations. */ + private final EnvironmentContainersClient environmentContainers; + + /** + * Gets the EnvironmentContainersClient object to access its operations. + * + * @return the EnvironmentContainersClient object. + */ + public EnvironmentContainersClient getEnvironmentContainers() { + return this.environmentContainers; + } + + /** The EnvironmentSpecificationVersionsClient object to access its operations. */ + private final EnvironmentSpecificationVersionsClient environmentSpecificationVersions; + + /** + * Gets the EnvironmentSpecificationVersionsClient object to access its operations. + * + * @return the EnvironmentSpecificationVersionsClient object. + */ + public EnvironmentSpecificationVersionsClient getEnvironmentSpecificationVersions() { + return this.environmentSpecificationVersions; + } + + /** The JobsClient object to access its operations. */ + private final JobsClient jobs; + + /** + * Gets the JobsClient object to access its operations. + * + * @return the JobsClient object. + */ + public JobsClient getJobs() { + return this.jobs; + } + + /** The LabelingJobsClient object to access its operations. */ + private final LabelingJobsClient labelingJobs; + + /** + * Gets the LabelingJobsClient object to access its operations. + * + * @return the LabelingJobsClient object. + */ + public LabelingJobsClient getLabelingJobs() { + return this.labelingJobs; + } + + /** The ModelContainersClient object to access its operations. */ + private final ModelContainersClient modelContainers; + + /** + * Gets the ModelContainersClient object to access its operations. + * + * @return the ModelContainersClient object. + */ + public ModelContainersClient getModelContainers() { + return this.modelContainers; + } + + /** The ModelVersionsClient object to access its operations. */ + private final ModelVersionsClient modelVersions; + + /** + * Gets the ModelVersionsClient object to access its operations. + * + * @return the ModelVersionsClient object. + */ + public ModelVersionsClient getModelVersions() { + return this.modelVersions; + } + + /** The OnlineEndpointsClient object to access its operations. */ + 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 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 WorkspaceSkusClient object to access its operations. */ + private final WorkspaceSkusClient workspaceSkus; + + /** + * Gets the WorkspaceSkusClient object to access its operations. + * + * @return the WorkspaceSkusClient object. + */ + public WorkspaceSkusClient getWorkspaceSkus() { + return this.workspaceSkus; } /** @@ -298,7 +454,7 @@ public WorkspaceConnectionsClient getWorkspaceConnections() { * @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 Azure subscription identifier. + * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ AzureMachineLearningWorkspacesImpl( @@ -313,21 +469,33 @@ public WorkspaceConnectionsClient getWorkspaceConnections() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-04-01"; + this.apiVersion = "2021-03-01-preview"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); - this.workspaceFeatures = new WorkspaceFeaturesClientImpl(this); this.usages = new UsagesClientImpl(this); this.virtualMachineSizes = new VirtualMachineSizesClientImpl(this); this.quotas = new QuotasClientImpl(this); - this.machineLearningComputes = new MachineLearningComputesClientImpl(this); - this.workspaceOperations = new WorkspaceOperationsClientImpl(this); + this.computes = new ComputesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); - this.machineLearningServices = new MachineLearningServicesClientImpl(this); - this.notebooks = new NotebooksClientImpl(this); - this.storageAccounts = new StorageAccountsClientImpl(this); this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); + this.batchEndpoints = new BatchEndpointsClientImpl(this); + this.batchDeployments = new BatchDeploymentsClientImpl(this); + this.codeContainers = new CodeContainersClientImpl(this); + this.codeVersions = new CodeVersionsClientImpl(this); + this.dataContainers = new DataContainersClientImpl(this); + this.dataVersions = new DataVersionsClientImpl(this); + this.datastores = new DatastoresClientImpl(this); + this.environmentContainers = new EnvironmentContainersClientImpl(this); + this.environmentSpecificationVersions = new EnvironmentSpecificationVersionsClientImpl(this); + this.jobs = new JobsClientImpl(this); + this.labelingJobs = new LabelingJobsClientImpl(this); + this.modelContainers = new ModelContainersClientImpl(this); + this.modelVersions = new ModelVersionsClientImpl(this); + this.onlineEndpoints = new OnlineEndpointsClientImpl(this); + this.onlineDeployments = new OnlineDeploymentsClientImpl(this); + this.workspaceFeatures = new WorkspaceFeaturesClientImpl(this); + this.workspaceSkus = new WorkspaceSkusClientImpl(this); } /** diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentTrackedResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentTrackedResourceImpl.java new file mode 100644 index 000000000000..29d48d952b62 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentTrackedResourceImpl.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchDeploymentTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.BatchDeployment; +import com.azure.resourcemanager.machinelearningservices.models.BatchDeploymentTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.PartialBatchDeployment; +import com.azure.resourcemanager.machinelearningservices.models.PartialBatchDeploymentPartialTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.ResourceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class BatchDeploymentTrackedResourceImpl + implements BatchDeploymentTrackedResource, + BatchDeploymentTrackedResource.Definition, + BatchDeploymentTrackedResource.Update { + private BatchDeploymentTrackedResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 ResourceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public BatchDeployment properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public BatchDeploymentTrackedResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String endpointName; + + private String deploymentName; + + private String resourceGroupName; + + private String workspaceName; + + private PartialBatchDeploymentPartialTrackedResource updateBody; + + public BatchDeploymentTrackedResourceImpl withExistingBatchEndpoint( + String endpointName, String resourceGroupName, String workspaceName) { + this.endpointName = endpointName; + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public BatchDeploymentTrackedResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getBatchDeployments() + .createOrUpdateWithResponse( + endpointName, deploymentName, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public BatchDeploymentTrackedResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBatchDeployments() + .createOrUpdateWithResponse( + endpointName, deploymentName, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + BatchDeploymentTrackedResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new BatchDeploymentTrackedResourceInner(); + this.serviceManager = serviceManager; + this.deploymentName = name; + } + + public BatchDeploymentTrackedResourceImpl update() { + this.updateBody = new PartialBatchDeploymentPartialTrackedResource(); + return this; + } + + public BatchDeploymentTrackedResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getBatchDeployments() + .updateWithResponse( + endpointName, deploymentName, resourceGroupName, workspaceName, updateBody, Context.NONE) + .getValue(); + return this; + } + + public BatchDeploymentTrackedResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBatchDeployments() + .updateWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, updateBody, context) + .getValue(); + return this; + } + + BatchDeploymentTrackedResourceImpl( + BatchDeploymentTrackedResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); + this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "deployments"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public BatchDeploymentTrackedResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getBatchDeployments() + .getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public BatchDeploymentTrackedResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBatchDeployments() + .getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public BatchDeploymentTrackedResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public BatchDeploymentTrackedResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public BatchDeploymentTrackedResourceImpl withProperties(BatchDeployment properties) { + this.innerModel().withProperties(properties); + return this; + } + + public BatchDeploymentTrackedResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public BatchDeploymentTrackedResourceImpl withIdentity(ResourceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public BatchDeploymentTrackedResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateBody.withKind(kind); + return this; + } + } + + public BatchDeploymentTrackedResourceImpl withProperties(PartialBatchDeployment properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentsClientImpl.java new file mode 100644 index 000000000000..8f3c79de20b7 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentsClientImpl.java @@ -0,0 +1,1284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.BatchDeploymentsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchDeploymentTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.BatchDeploymentTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearningservices.models.PartialBatchDeploymentPartialTrackedResource; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in BatchDeploymentsClient. */ +public final class BatchDeploymentsClientImpl implements BatchDeploymentsClient { + private final ClientLogger logger = new ClientLogger(BatchDeploymentsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final BatchDeploymentsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of BatchDeploymentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BatchDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl 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 + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface BatchDeploymentsService { + @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("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @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, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @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}/batchEndpoints/{endpointName}" + + "/deployments/{deploymentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @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"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" + + "/deployments/{deploymentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") PartialBatchDeploymentPartialTrackedResource body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" + + "/deployments/{deploymentName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") BatchDeploymentTrackedResourceInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 BatchDeployment entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String endpointName, String resourceGroupName, String workspaceName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + endpointName, + this.client.getApiVersion(), + orderBy, + top, + skip, + 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())); + } + + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + endpointName, + this.client.getApiVersion(), + orderBy, + top, + skip, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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. + * + * @param endpointName Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 BatchDeployment entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String endpointName, String resourceGroupName, String workspaceName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint 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 BatchDeployment entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String endpointName, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint 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 BatchDeployment entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String endpointName, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(listAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip)); + } + + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedIterable<>( + listAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip, context)); + } + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String endpointName, String deploymentName, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String endpointName, String deploymentName, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + deleteAsync(endpointName, deploymentName, resourceGroupName, workspaceName).block(); + } + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 batch inference deployment by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String endpointName, String deploymentName, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 a batch inference deployment by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String endpointName, String deploymentName, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 batch inference deployment by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 batch inference deployment by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchDeploymentTrackedResourceInner get( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + return getAsync(endpointName, deploymentName, resourceGroupName, workspaceName).block(); + } + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 a batch inference deployment by id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Update a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialBatchDeploymentPartialTrackedResource body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialBatchDeploymentPartialTrackedResource body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Update a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialBatchDeploymentPartialTrackedResource body) { + return updateWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Update a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchDeploymentTrackedResourceInner update( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialBatchDeploymentPartialTrackedResource body) { + return updateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Update a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialBatchDeploymentPartialTrackedResource body, + Context context) { + return updateWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context) + .block(); + } + + /** + * Creates/updates a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + BatchDeploymentTrackedResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates/updates a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + BatchDeploymentTrackedResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Creates/updates a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + BatchDeploymentTrackedResourceInner body) { + return createOrUpdateWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates/updates a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchDeploymentTrackedResourceInner createOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + BatchDeploymentTrackedResourceInner body) { + return createOrUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Creates/updates a batch inference deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The identifier for the Batch inference deployment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + BatchDeploymentTrackedResourceInner body, + Context context) { + return createOrUpdateWithResponseAsync( + endpointName, deploymentName, resourceGroupName, workspaceName, body, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of BatchDeployment entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of BatchDeployment entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentsImpl.java new file mode 100644 index 000000000000..96d680e8ea3a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchDeploymentsImpl.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.BatchDeploymentsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchDeploymentTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.BatchDeploymentTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.BatchDeployments; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class BatchDeploymentsImpl implements BatchDeployments { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchDeploymentsImpl.class); + + private final BatchDeploymentsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public BatchDeploymentsImpl( + BatchDeploymentsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String endpointName, String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(endpointName, resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new BatchDeploymentTrackedResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + PagedIterable inner = + this.serviceClient().list(endpointName, resourceGroupName, workspaceName, orderBy, top, skip, context); + return Utils.mapPage(inner, inner1 -> new BatchDeploymentTrackedResourceImpl(inner1, this.manager())); + } + + public void delete(String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(endpointName, deploymentName, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + return this + .serviceClient() + .deleteWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, context); + } + + public BatchDeploymentTrackedResource get( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + BatchDeploymentTrackedResourceInner inner = + this.serviceClient().get(endpointName, deploymentName, resourceGroupName, workspaceName); + if (inner != null) { + return new BatchDeploymentTrackedResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BatchDeploymentTrackedResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BatchDeploymentTrackedResource getById(String id) { + String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + } + String deploymentName = Utils.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))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this + .getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + } + String deploymentName = Utils.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))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + } + String deploymentName = Utils.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))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this + .deleteWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + } + String deploymentName = Utils.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))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, context); + } + + private BatchDeploymentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public BatchDeploymentTrackedResourceImpl define(String name) { + return new BatchDeploymentTrackedResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointImpl.java new file mode 100644 index 000000000000..c79dbce1511a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointImpl.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.models.BatchEndpoint; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthKeys; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthMode; +import java.util.Collections; +import java.util.Map; + +public final class BatchEndpointImpl implements BatchEndpoint { + private BatchEndpointInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + BatchEndpointImpl( + BatchEndpointInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + 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) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String scoringUri() { + return this.innerModel().scoringUri(); + } + + public String swaggerUri() { + return this.innerModel().swaggerUri(); + } + + public Map traffic() { + Map inner = this.innerModel().traffic(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public BatchEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointTrackedResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointTrackedResourceImpl.java new file mode 100644 index 000000000000..76277f6adf39 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointTrackedResourceImpl.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.BatchEndpointInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.BatchEndpoint; +import com.azure.resourcemanager.machinelearningservices.models.BatchEndpointTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthKeys; +import com.azure.resourcemanager.machinelearningservices.models.PartialBatchEndpoint; +import com.azure.resourcemanager.machinelearningservices.models.PartialBatchEndpointPartialTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.ResourceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class BatchEndpointTrackedResourceImpl + implements BatchEndpointTrackedResource, + BatchEndpointTrackedResource.Definition, + BatchEndpointTrackedResource.Update { + private BatchEndpointTrackedResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 ResourceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public BatchEndpoint properties() { + BatchEndpointInner inner = this.innerModel().properties(); + if (inner != null) { + return new BatchEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public BatchEndpointTrackedResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String endpointName; + + private String resourceGroupName; + + private String workspaceName; + + private PartialBatchEndpointPartialTrackedResource updateBody; + + public BatchEndpointTrackedResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public BatchEndpointTrackedResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getBatchEndpoints() + .createOrUpdateWithResponse( + endpointName, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public BatchEndpointTrackedResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBatchEndpoints() + .createOrUpdateWithResponse(endpointName, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + BatchEndpointTrackedResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new BatchEndpointTrackedResourceInner(); + this.serviceManager = serviceManager; + this.endpointName = name; + } + + public BatchEndpointTrackedResourceImpl update() { + this.updateBody = new PartialBatchEndpointPartialTrackedResource(); + return this; + } + + public BatchEndpointTrackedResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getBatchEndpoints() + .updateWithResponse(endpointName, resourceGroupName, workspaceName, updateBody, Context.NONE) + .getValue(); + return this; + } + + public BatchEndpointTrackedResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBatchEndpoints() + .updateWithResponse(endpointName, resourceGroupName, workspaceName, updateBody, context) + .getValue(); + return this; + } + + BatchEndpointTrackedResourceImpl( + BatchEndpointTrackedResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public BatchEndpointTrackedResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getBatchEndpoints() + .getWithResponse(endpointName, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public BatchEndpointTrackedResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBatchEndpoints() + .getWithResponse(endpointName, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public EndpointAuthKeys listKeys() { + return serviceManager.batchEndpoints().listKeys(endpointName, resourceGroupName, workspaceName); + } + + public Response listKeysWithResponse(Context context) { + return serviceManager + .batchEndpoints() + .listKeysWithResponse(endpointName, resourceGroupName, workspaceName, context); + } + + public BatchEndpointTrackedResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public BatchEndpointTrackedResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public BatchEndpointTrackedResourceImpl withProperties(BatchEndpointInner properties) { + this.innerModel().withProperties(properties); + return this; + } + + public BatchEndpointTrackedResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public BatchEndpointTrackedResourceImpl withIdentity(ResourceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public BatchEndpointTrackedResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateBody.withKind(kind); + return this; + } + } + + public BatchEndpointTrackedResourceImpl withProperties(PartialBatchEndpoint properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointsClientImpl.java new file mode 100644 index 000000000000..79d12343ee96 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointsClientImpl.java @@ -0,0 +1,1334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.BatchEndpointsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.models.BatchEndpointTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearningservices.models.PartialBatchEndpointPartialTrackedResource; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in BatchEndpointsClient. */ +public final class BatchEndpointsClientImpl implements BatchEndpointsClient { + private final ClientLogger logger = new ClientLogger(BatchEndpointsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final BatchEndpointsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of BatchEndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BatchEndpointsClientImpl(AzureMachineLearningWorkspacesImpl 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 + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface BatchEndpointsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @QueryParam("count") Integer count, + @QueryParam("$skip") String skip, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @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}/batchEndpoints/{endpointName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @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"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") PartialBatchEndpointPartialTrackedResource body, + @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}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") BatchEndpointTrackedResourceInner body, + @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("endpointName") String endpointName, + @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("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * 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 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. + */ + @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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + count, + skip, + 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())); + } + + /** + * 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 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. + */ + @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.getApiVersion(), + count, + skip, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @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 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. + */ + @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 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. + */ + @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. + * + * @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. + */ + @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)); + } + + /** + * 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 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. + */ + @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)); + } + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String endpointName, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(endpointName, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String endpointName, String resourceGroupName, String workspaceName) { + deleteAsync(endpointName, resourceGroupName, workspaceName).block(); + } + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(endpointName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 batch inference endpoint by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 a batch inference endpoint by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 batch inference endpoint by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String endpointName, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(endpointName, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 batch inference endpoint by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchEndpointTrackedResourceInner get(String endpointName, String resourceGroupName, String workspaceName) { + return getAsync(endpointName, resourceGroupName, workspaceName).block(); + } + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 a batch inference endpoint by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(endpointName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Update a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialBatchEndpointPartialTrackedResource body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialBatchEndpointPartialTrackedResource body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Update a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialBatchEndpointPartialTrackedResource body) { + return updateWithResponseAsync(endpointName, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Update a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchEndpointTrackedResourceInner update( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialBatchEndpointPartialTrackedResource body) { + return updateAsync(endpointName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Update a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialBatchEndpointPartialTrackedResource body, + Context context) { + return updateWithResponseAsync(endpointName, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Creates a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String endpointName, String resourceGroupName, String workspaceName, BatchEndpointTrackedResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + BatchEndpointTrackedResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Creates a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String endpointName, String resourceGroupName, String workspaceName, BatchEndpointTrackedResourceInner body) { + return createOrUpdateWithResponseAsync(endpointName, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchEndpointTrackedResourceInner createOrUpdate( + String endpointName, String resourceGroupName, String workspaceName, BatchEndpointTrackedResourceInner body) { + return createOrUpdateAsync(endpointName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Creates a batch inference endpoint. + * + * @param endpointName Name for the Batch inference endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String endpointName, + String resourceGroupName, + String workspaceName, + BatchEndpointTrackedResourceInner body, + Context context) { + return createOrUpdateWithResponseAsync(endpointName, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint name. + * @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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync( + String endpointName, String resourceGroupName, String workspaceName) { + return listKeysWithResponseAsync(endpointName, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointAuthKeysInner listKeys(String endpointName, String resourceGroupName, String workspaceName) { + return listKeysAsync(endpointName, resourceGroupName, workspaceName).block(); + } + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint name. + * @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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return listKeysWithResponseAsync(endpointName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of BatchEndpoint entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of BatchEndpoint entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointsImpl.java new file mode 100644 index 000000000000..34892a9cc9fc --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/BatchEndpointsImpl.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.BatchEndpointsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.models.BatchEndpointTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.BatchEndpoints; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthKeys; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class BatchEndpointsImpl implements BatchEndpoints { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchEndpointsImpl.class); + + private final BatchEndpointsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public BatchEndpointsImpl( + BatchEndpointsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new BatchEndpointTrackedResourceImpl(inner1, 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 Utils.mapPage(inner, inner1 -> new BatchEndpointTrackedResourceImpl(inner1, this.manager())); + } + + public void delete(String endpointName, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(endpointName, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(endpointName, resourceGroupName, workspaceName, context); + } + + public BatchEndpointTrackedResource get(String endpointName, String resourceGroupName, String workspaceName) { + BatchEndpointTrackedResourceInner inner = + this.serviceClient().get(endpointName, resourceGroupName, workspaceName); + if (inner != null) { + return new BatchEndpointTrackedResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(endpointName, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BatchEndpointTrackedResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EndpointAuthKeys listKeys(String endpointName, String resourceGroupName, String workspaceName) { + EndpointAuthKeysInner inner = this.serviceClient().listKeys(endpointName, resourceGroupName, workspaceName); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listKeysWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().listKeysWithResponse(endpointName, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EndpointAuthKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BatchEndpointTrackedResource getById(String id) { + String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(endpointName, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(endpointName, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(endpointName, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(endpointName, resourceGroupName, workspaceName, context); + } + + private BatchEndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public BatchEndpointTrackedResourceImpl define(String name) { + return new BatchEndpointTrackedResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainerResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainerResourceImpl.java new file mode 100644 index 000000000000..cf31d268df91 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainerResourceImpl.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.CodeContainer; +import com.azure.resourcemanager.machinelearningservices.models.CodeContainerResource; + +public final class CodeContainerResourceImpl + implements CodeContainerResource, CodeContainerResource.Definition, CodeContainerResource.Update { + private CodeContainerResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public CodeContainer properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public CodeContainerResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String resourceGroupName; + + private String workspaceName; + + public CodeContainerResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public CodeContainerResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getCodeContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public CodeContainerResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCodeContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + CodeContainerResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new CodeContainerResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public CodeContainerResourceImpl update() { + return this; + } + + public CodeContainerResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getCodeContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public CodeContainerResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCodeContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + CodeContainerResourceImpl( + CodeContainerResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public CodeContainerResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getCodeContainers() + .getWithResponse(name, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public CodeContainerResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCodeContainers() + .getWithResponse(name, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public CodeContainerResourceImpl withProperties(CodeContainer properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainersClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainersClientImpl.java new file mode 100644 index 000000000000..dd33616aa08c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainersClientImpl.java @@ -0,0 +1,914 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.CodeContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.CodeContainerResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CodeContainersClient. */ +public final class CodeContainersClientImpl implements CodeContainersClient { + private final ClientLogger logger = new ClientLogger(CodeContainersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final CodeContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of CodeContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CodeContainersClientImpl(AzureMachineLearningWorkspacesImpl 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 + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface CodeContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @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}/codes/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") CodeContainerResourceInner body, + @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); + } + + /** + * 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 CodeContainer entities. + */ + @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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + skip, + 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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @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.getApiVersion(), + skip, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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 CodeContainer entities. + */ + @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 CodeContainer entities. + */ + @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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @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 CodeContainer entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + } + + /** + * Delete container. + * + * @param name Container 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param name Container name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete container. + * + * @param name Container 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete container. + * + * @param name Container 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String resourceGroupName, String workspaceName) { + deleteAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String name, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerResourceInner get(String name, String resourceGroupName, String workspaceName) { + return getAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String name, String resourceGroupName, String workspaceName, CodeContainerResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, String resourceGroupName, String workspaceName, CodeContainerResourceInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String name, String resourceGroupName, String workspaceName, CodeContainerResourceInner body) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, CodeContainerResourceInner body) { + return createOrUpdateAsync(name, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 Response createOrUpdateWithResponse( + String name, String resourceGroupName, String workspaceName, CodeContainerResourceInner body, Context context) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of CodeContainer entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of CodeContainer entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainersImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainersImpl.java new file mode 100644 index 000000000000..b8c8336bacc5 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeContainersImpl.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.CodeContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.CodeContainerResource; +import com.azure.resourcemanager.machinelearningservices.models.CodeContainers; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class CodeContainersImpl implements CodeContainers { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeContainersImpl.class); + + private final CodeContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public CodeContainersImpl( + CodeContainersClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new CodeContainerResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return Utils.mapPage(inner, inner1 -> new CodeContainerResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + public CodeContainerResource get(String name, String resourceGroupName, String workspaceName) { + CodeContainerResourceInner inner = this.serviceClient().get(name, resourceGroupName, workspaceName); + if (inner != null) { + return new CodeContainerResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeContainerResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CodeContainerResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "codes"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "codes"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "codes"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "codes"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + private CodeContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public CodeContainerResourceImpl define(String name) { + return new CodeContainerResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionResourceImpl.java new file mode 100644 index 000000000000..3284f082ceb3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionResourceImpl.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.CodeVersion; +import com.azure.resourcemanager.machinelearningservices.models.CodeVersionResource; + +public final class CodeVersionResourceImpl + implements CodeVersionResource, CodeVersionResource.Definition, CodeVersionResource.Update { + private CodeVersionResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public CodeVersion properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public CodeVersionResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String version; + + private String resourceGroupName; + + private String workspaceName; + + public CodeVersionResourceImpl withExistingCode(String name, String resourceGroupName, String workspaceName) { + this.name = name; + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public CodeVersionResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getCodeVersions() + .createOrUpdateWithResponse( + name, version, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public CodeVersionResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCodeVersions() + .createOrUpdateWithResponse(name, version, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + CodeVersionResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new CodeVersionResourceInner(); + this.serviceManager = serviceManager; + this.version = name; + } + + public CodeVersionResourceImpl update() { + return this; + } + + public CodeVersionResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getCodeVersions() + .createOrUpdateWithResponse( + name, version, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public CodeVersionResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCodeVersions() + .createOrUpdateWithResponse(name, version, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + CodeVersionResourceImpl( + CodeVersionResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); + this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public CodeVersionResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getCodeVersions() + .getWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public CodeVersionResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCodeVersions() + .getWithResponse(name, version, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public CodeVersionResourceImpl withProperties(CodeVersion properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionsClientImpl.java new file mode 100644 index 000000000000..84c3a424bbbc --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionsClientImpl.java @@ -0,0 +1,1022 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.CodeVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.CodeVersionResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CodeVersionsClient. */ +public final class CodeVersionsClientImpl implements CodeVersionsClient { + private final ClientLogger logger = new ClientLogger(CodeVersionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final CodeVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of CodeVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CodeVersionsClientImpl(AzureMachineLearningWorkspacesImpl 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 + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface CodeVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @PathParam("version") String version, + @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}/codes/{name}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("version") String version, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") CodeVersionResourceInner body, + @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); + } + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String name, String resourceGroupName, String workspaceName, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + name, + this.client.getApiVersion(), + orderBy, + top, + skip, + 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 versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String name, + String resourceGroupName, + String workspaceName, + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + name, + this.client.getApiVersion(), + orderBy, + top, + skip, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, String resourceGroupName, String workspaceName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param name Container 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 CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String name, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param name Container 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 CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String name, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(listAsync(name, resourceGroupName, workspaceName, orderBy, top, skip)); + } + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedIterable<>(listAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, context)); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String version, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, version, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String version, String resourceGroupName, String workspaceName) { + deleteAsync(name, version, resourceGroupName, workspaceName).block(); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, version, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String name, String version, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, version, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionResourceInner get(String name, String version, String resourceGroupName, String workspaceName) { + return getAsync(name, version, resourceGroupName, workspaceName).block(); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, version, resourceGroupName, workspaceName, context).block(); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, String version, String resourceGroupName, String workspaceName, CodeVersionResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, + String version, + String resourceGroupName, + String workspaceName, + CodeVersionResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono createOrUpdateAsync( + String name, String version, String resourceGroupName, String workspaceName, CodeVersionResourceInner body) { + return createOrUpdateWithResponseAsync(name, version, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 CodeVersionResourceInner createOrUpdate( + String name, String version, String resourceGroupName, String workspaceName, CodeVersionResourceInner body) { + return createOrUpdateAsync(name, version, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 Response createOrUpdateWithResponse( + String name, + String version, + String resourceGroupName, + String workspaceName, + CodeVersionResourceInner body, + Context context) { + return createOrUpdateWithResponseAsync(name, version, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of CodeVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionsImpl.java new file mode 100644 index 000000000000..dddce90e095f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/CodeVersionsImpl.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.CodeVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.CodeVersionResource; +import com.azure.resourcemanager.machinelearningservices.models.CodeVersions; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class CodeVersionsImpl implements CodeVersions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeVersionsImpl.class); + + private final CodeVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public CodeVersionsImpl( + CodeVersionsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String name, String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(name, resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new CodeVersionResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + PagedIterable inner = + this.serviceClient().list(name, resourceGroupName, workspaceName, orderBy, top, skip, context); + return Utils.mapPage(inner, inner1 -> new CodeVersionResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String version, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, version, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + public CodeVersionResource get(String name, String version, String resourceGroupName, String workspaceName) { + CodeVersionResourceInner inner = this.serviceClient().get(name, version, resourceGroupName, workspaceName); + if (inner != null) { + return new CodeVersionResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, version, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CodeVersionResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CodeVersionResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "codes"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "codes"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "codes"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "codes"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'codes'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + private CodeVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public CodeVersionResourceImpl define(String name) { + return new CodeVersionResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeResourceImpl.java index 340f21513bf7..0bf7bc8008fb 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeResourceImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputeResourceImpl.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.machinelearningservices.models.ClusterUpdateParameters; import com.azure.resourcemanager.machinelearningservices.models.Compute; import com.azure.resourcemanager.machinelearningservices.models.ComputeResource; +import com.azure.resourcemanager.machinelearningservices.models.ComputeSchedules; import com.azure.resourcemanager.machinelearningservices.models.ComputeSecrets; import com.azure.resourcemanager.machinelearningservices.models.Identity; import com.azure.resourcemanager.machinelearningservices.models.ScaleSettings; @@ -38,6 +39,10 @@ public String type() { return this.innerModel().type(); } + public Identity identity() { + return this.innerModel().identity(); + } + public String location() { return this.innerModel().location(); } @@ -51,14 +56,6 @@ public Map tags() { } } - public Compute properties() { - return this.innerModel().properties(); - } - - public Identity identity() { - return this.innerModel().identity(); - } - public Sku sku() { return this.innerModel().sku(); } @@ -67,6 +64,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public Compute properties() { + return this.innerModel().properties(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -101,7 +102,7 @@ public ComputeResource create() { this.innerObject = serviceManager .serviceClient() - .getMachineLearningComputes() + .getComputes() .createOrUpdate(resourceGroupName, workspaceName, computeName, this.innerModel(), Context.NONE); return this; } @@ -110,7 +111,7 @@ public ComputeResource create(Context context) { this.innerObject = serviceManager .serviceClient() - .getMachineLearningComputes() + .getComputes() .createOrUpdate(resourceGroupName, workspaceName, computeName, this.innerModel(), context); return this; } @@ -131,7 +132,7 @@ public ComputeResource apply() { this.innerObject = serviceManager .serviceClient() - .getMachineLearningComputes() + .getComputes() .update(resourceGroupName, workspaceName, computeName, updateParameters, Context.NONE); return this; } @@ -140,7 +141,7 @@ public ComputeResource apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getMachineLearningComputes() + .getComputes() .update(resourceGroupName, workspaceName, computeName, updateParameters, context); return this; } @@ -159,7 +160,7 @@ public ComputeResource refresh() { this.innerObject = serviceManager .serviceClient() - .getMachineLearningComputes() + .getComputes() .getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE) .getValue(); return this; @@ -169,56 +170,60 @@ public ComputeResource refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getMachineLearningComputes() + .getComputes() .getWithResponse(resourceGroupName, workspaceName, computeName, context) .getValue(); return this; } public PagedIterable listNodes() { - return serviceManager.machineLearningComputes().listNodes(resourceGroupName, workspaceName, computeName); + return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName); } public PagedIterable listNodes(Context context) { - return serviceManager - .machineLearningComputes() - .listNodes(resourceGroupName, workspaceName, computeName, context); + return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName, context); } public ComputeSecrets listKeys() { - return serviceManager.machineLearningComputes().listKeys(resourceGroupName, workspaceName, computeName); + return serviceManager.computes().listKeys(resourceGroupName, workspaceName, computeName); } public Response listKeysWithResponse(Context context) { - return serviceManager - .machineLearningComputes() - .listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); + return serviceManager.computes().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); } public void start() { - serviceManager.machineLearningComputes().start(resourceGroupName, workspaceName, computeName); + serviceManager.computes().start(resourceGroupName, workspaceName, computeName); } public void start(Context context) { - serviceManager.machineLearningComputes().start(resourceGroupName, workspaceName, computeName, context); + serviceManager.computes().start(resourceGroupName, workspaceName, computeName, context); } public void stop() { - serviceManager.machineLearningComputes().stop(resourceGroupName, workspaceName, computeName); + serviceManager.computes().stop(resourceGroupName, workspaceName, computeName); } public void stop(Context context) { - serviceManager.machineLearningComputes().stop(resourceGroupName, workspaceName, computeName, context); + serviceManager.computes().stop(resourceGroupName, workspaceName, computeName, context); } public void restart() { - serviceManager.machineLearningComputes().restart(resourceGroupName, workspaceName, computeName); + serviceManager.computes().restart(resourceGroupName, workspaceName, computeName); } public Response restartWithResponse(Context context) { + return serviceManager.computes().restartWithResponse(resourceGroupName, workspaceName, computeName, context); + } + + public void updateSchedules() { + serviceManager.computes().updateSchedules(resourceGroupName, workspaceName, computeName); + } + + public Response updateSchedulesWithResponse(ComputeSchedules parameters, Context context) { return serviceManager - .machineLearningComputes() - .restartWithResponse(resourceGroupName, workspaceName, computeName, context); + .computes() + .updateSchedulesWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); } public ComputeResourceImpl withRegion(Region location) { @@ -236,11 +241,6 @@ public ComputeResourceImpl withTags(Map tags) { return this; } - public ComputeResourceImpl withProperties(Compute properties) { - this.innerModel().withProperties(properties); - return this; - } - public ComputeResourceImpl withIdentity(Identity identity) { this.innerModel().withIdentity(identity); return this; @@ -251,6 +251,11 @@ public ComputeResourceImpl withSku(Sku sku) { return this; } + public ComputeResourceImpl withProperties(Compute properties) { + this.innerModel().withProperties(properties); + return this; + } + public ComputeResourceImpl withScaleSettings(ScaleSettings scaleSettings) { this.updateParameters.withScaleSettings(scaleSettings); return this; diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputesClientImpl.java similarity index 86% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesClientImpl.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputesClientImpl.java index 486c37c45ef2..fd8a69e1ef30 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesClientImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputesClientImpl.java @@ -34,54 +34,53 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningComputesClient; +import com.azure.resourcemanager.machinelearningservices.fluent.ComputesClient; import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodeInformation; import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodesInformation; import com.azure.resourcemanager.machinelearningservices.models.ClusterUpdateParameters; +import com.azure.resourcemanager.machinelearningservices.models.ComputeSchedules; import com.azure.resourcemanager.machinelearningservices.models.PaginatedComputeResourcesList; import com.azure.resourcemanager.machinelearningservices.models.UnderlyingResourceAction; 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 MachineLearningComputesClient. */ -public final class MachineLearningComputesClientImpl implements MachineLearningComputesClient { - private final ClientLogger logger = new ClientLogger(MachineLearningComputesClientImpl.class); +/** An instance of this class provides access to all the operations defined in ComputesClient. */ +public final class ComputesClientImpl implements ComputesClient { + private final ClientLogger logger = new ClientLogger(ComputesClientImpl.class); /** The proxy service used to perform REST calls. */ - private final MachineLearningComputesService service; + private final ComputesService service; /** The service client containing this operation class. */ private final AzureMachineLearningWorkspacesImpl client; /** - * Initializes an instance of MachineLearningComputesClientImpl. + * Initializes an instance of ComputesClientImpl. * * @param client the instance of the service client containing this operation class. */ - MachineLearningComputesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create(MachineLearningComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + ComputesClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(ComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesMachineLearningComputes to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningWorkspacesComputes to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") - private interface MachineLearningComputesService { + private interface ComputesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace( + Mono> list( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -238,11 +237,29 @@ Mono> restart( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}" + + "/updateSchedules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateSchedules( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ComputeSchedules parameters, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -262,7 +279,7 @@ Mono> listNodesNext( /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -271,7 +288,7 @@ Mono> listNodesNext( * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip) { if (this.client.getEndpoint() == null) { return Mono @@ -297,7 +314,7 @@ private Mono> listByWorkspaceSinglePageAsync .withContext( context -> service - .listByWorkspace( + .list( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -321,7 +338,7 @@ private Mono> listByWorkspaceSinglePageAsync /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -331,7 +348,7 @@ private Mono> listByWorkspaceSinglePageAsync * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -355,7 +372,7 @@ private Mono> listByWorkspaceSinglePageAsync final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspace( + .list( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -378,7 +395,7 @@ private Mono> listByWorkspaceSinglePageAsync /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -387,17 +404,16 @@ private Mono> listByWorkspaceSinglePageAsync * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName, String skip) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -405,17 +421,17 @@ private PagedFlux listByWorkspaceAsync( * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -425,17 +441,17 @@ private PagedFlux listByWorkspaceAsync(String resourceGrou * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, Context context) { return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -443,15 +459,15 @@ private PagedFlux listByWorkspaceAsync( * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, skip)); + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); } /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -461,16 +477,16 @@ public PagedIterable listByWorkspace(String resourceGroupN * @return computes in specified workspace. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, Context context) { - return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, skip, context)); + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, 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 Name of the resource group in which workspace is located. + * @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. @@ -524,7 +540,7 @@ private Mono> getWithResponseAsync( * 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 Name of the resource group in which workspace is located. + * @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. @@ -576,7 +592,7 @@ private Mono> getWithResponseAsync( * 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 Name of the resource group in which workspace is located. + * @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. @@ -601,7 +617,7 @@ private Mono getAsync(String resourceGroupName, String wor * 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 Name of the resource group in which workspace is located. + * @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. @@ -618,7 +634,7 @@ public ComputeResourceInner get(String resourceGroupName, String workspaceName, * 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 Name of the resource group in which workspace is located. + * @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. @@ -637,7 +653,7 @@ public Response getWithResponse( * 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 Name of the resource group in which workspace is located. + * @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. @@ -698,7 +714,7 @@ private Mono>> createOrUpdateWithResponseAsync( * 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 Name of the resource group in which workspace is located. + * @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. @@ -761,7 +777,7 @@ private Mono>> createOrUpdateWithResponseAsync( * 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 Name of the resource group in which workspace is located. + * @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. @@ -789,7 +805,7 @@ private PollerFlux, ComputeResourceInner> begin * 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 Name of the resource group in which workspace is located. + * @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. @@ -819,7 +835,7 @@ private PollerFlux, ComputeResourceInner> begin * 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 Name of the resource group in which workspace is located. + * @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. @@ -838,7 +854,7 @@ public SyncPoller, ComputeResourceInner> beginC * 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 Name of the resource group in which workspace is located. + * @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. @@ -863,7 +879,7 @@ public SyncPoller, ComputeResourceInner> beginC * 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 Name of the resource group in which workspace is located. + * @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. @@ -884,7 +900,7 @@ private Mono createOrUpdateAsync( * 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 Name of the resource group in which workspace is located. + * @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. @@ -910,7 +926,7 @@ private Mono createOrUpdateAsync( * 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 Name of the resource group in which workspace is located. + * @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. @@ -929,7 +945,7 @@ public ComputeResourceInner createOrUpdate( * 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 Name of the resource group in which workspace is located. + * @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. @@ -953,7 +969,7 @@ public ComputeResourceInner createOrUpdate( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1014,7 +1030,7 @@ private Mono>> updateWithResponseAsync( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1077,7 +1093,7 @@ private Mono>> updateWithResponseAsync( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1105,7 +1121,7 @@ private PollerFlux, ComputeResourceInner> begin * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1135,7 +1151,7 @@ private PollerFlux, ComputeResourceInner> begin * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1154,7 +1170,7 @@ public SyncPoller, ComputeResourceInner> beginU * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1178,7 +1194,7 @@ public SyncPoller, ComputeResourceInner> beginU * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1199,7 +1215,7 @@ private Mono updateAsync( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1225,7 +1241,7 @@ private Mono updateAsync( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1244,7 +1260,7 @@ public ComputeResourceInner update( * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 Additional parameters for cluster update. @@ -1267,7 +1283,7 @@ public ComputeResourceInner update( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1331,7 +1347,7 @@ private Mono>> deleteWithResponseAsync( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1394,7 +1410,7 @@ private Mono>> deleteWithResponseAsync( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1420,7 +1436,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1449,7 +1465,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1472,7 +1488,7 @@ public SyncPoller, Void> beginDelete( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1497,7 +1513,7 @@ public SyncPoller, Void> beginDelete( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1521,7 +1537,7 @@ private Mono deleteAsync( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1547,7 +1563,7 @@ private Mono deleteAsync( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1568,7 +1584,7 @@ public void delete( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -1591,13 +1607,13 @@ public void delete( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNodesSinglePageAsync( @@ -1653,14 +1669,14 @@ private Mono> listNodesSinglePageAsync( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNodesSinglePageAsync( @@ -1713,13 +1729,13 @@ private Mono> listNodesSinglePageAsync( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listNodesAsync( @@ -1732,14 +1748,14 @@ private PagedFlux listNodesAsync( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listNodesAsync( @@ -1752,13 +1768,13 @@ private PagedFlux listNodesAsync( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listNodes( @@ -1769,14 +1785,14 @@ public PagedIterable listNodes( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listNodes( @@ -1787,7 +1803,7 @@ public PagedIterable listNodes( /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1840,7 +1856,7 @@ private Mono> listKeysWithResponseAsync( /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1891,7 +1907,7 @@ private Mono> listKeysWithResponseAsync( /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1916,7 +1932,7 @@ private Mono listKeysAsync( /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1932,7 +1948,7 @@ public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceNa /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1950,7 +1966,7 @@ public Response listKeysWithResponse( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2003,7 +2019,7 @@ private Mono>> startWithResponseAsync( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2054,7 +2070,7 @@ private Mono>> startWithResponseAsync( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2074,7 +2090,7 @@ private PollerFlux, Void> beginStartAsync( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2097,7 +2113,7 @@ private PollerFlux, Void> beginStartAsync( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2114,7 +2130,7 @@ public SyncPoller, Void> beginStart( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2132,7 +2148,7 @@ public SyncPoller, Void> beginStart( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2150,7 +2166,7 @@ private Mono startAsync(String resourceGroupName, String workspaceName, St /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2169,7 +2185,7 @@ private Mono startAsync(String resourceGroupName, String workspaceName, St /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2184,7 +2200,7 @@ public void start(String resourceGroupName, String workspaceName, String compute /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2200,7 +2216,7 @@ public void start(String resourceGroupName, String workspaceName, String compute /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2253,7 +2269,7 @@ private Mono>> stopWithResponseAsync( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2304,7 +2320,7 @@ private Mono>> stopWithResponseAsync( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2324,7 +2340,7 @@ private PollerFlux, Void> beginStopAsync( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2347,7 +2363,7 @@ private PollerFlux, Void> beginStopAsync( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2364,7 +2380,7 @@ public SyncPoller, Void> beginStop( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2382,7 +2398,7 @@ public SyncPoller, Void> beginStop( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2400,7 +2416,7 @@ private Mono stopAsync(String resourceGroupName, String workspaceName, Str /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2419,7 +2435,7 @@ private Mono stopAsync(String resourceGroupName, String workspaceName, Str /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2434,7 +2450,7 @@ public void stop(String resourceGroupName, String workspaceName, String computeN /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2450,7 +2466,7 @@ public void stop(String resourceGroupName, String workspaceName, String computeN /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2503,7 +2519,7 @@ private Mono> restartWithResponseAsync( /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2554,7 +2570,7 @@ private Mono> restartWithResponseAsync( /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2571,7 +2587,7 @@ private Mono restartAsync(String resourceGroupName, String workspaceName, /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2586,7 +2602,7 @@ public void restart(String resourceGroupName, String workspaceName, String compu /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -2601,6 +2617,201 @@ public Response restartWithResponse( return restartWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); } + /** + * Updates schedules 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 computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating schedules 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSchedulesWithResponseAsync( + String resourceGroupName, String workspaceName, String computeName, ComputeSchedules 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) { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSchedules( + 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())); + } + + /** + * Updates schedules 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 computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating schedules 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSchedulesWithResponseAsync( + String resourceGroupName, + String workspaceName, + String computeName, + ComputeSchedules 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) { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSchedules( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + computeName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Updates schedules 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 computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating schedules 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSchedulesAsync( + String resourceGroupName, String workspaceName, String computeName, ComputeSchedules parameters) { + return updateSchedulesWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Updates schedules 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 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSchedulesAsync(String resourceGroupName, String workspaceName, String computeName) { + final ComputeSchedules parameters = null; + return updateSchedulesWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Updates schedules 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 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 updateSchedules(String resourceGroupName, String workspaceName, String computeName) { + final ComputeSchedules parameters = null; + updateSchedulesAsync(resourceGroupName, workspaceName, computeName, parameters).block(); + } + + /** + * Updates schedules 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 computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating schedules 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSchedulesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + ComputeSchedules parameters, + Context context) { + return updateSchedulesWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context) + .block(); + } + /** * Get the next page of items. * @@ -2611,7 +2822,7 @@ public Response restartWithResponse( * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2623,7 +2834,7 @@ private Mono> listByWorkspaceNextSinglePageA } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -2647,8 +2858,7 @@ private Mono> listByWorkspaceNextSinglePageA * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2661,7 +2871,7 @@ private Mono> listByWorkspaceNextSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) + .listNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputesImpl.java similarity index 87% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesImpl.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputesImpl.java index 696a32929219..43dcc3be8022 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningComputesImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ComputesImpl.java @@ -9,40 +9,40 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningComputesClient; +import com.azure.resourcemanager.machinelearningservices.fluent.ComputesClient; import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeSecretsInner; import com.azure.resourcemanager.machinelearningservices.models.AmlComputeNodeInformation; import com.azure.resourcemanager.machinelearningservices.models.ComputeResource; +import com.azure.resourcemanager.machinelearningservices.models.ComputeSchedules; import com.azure.resourcemanager.machinelearningservices.models.ComputeSecrets; -import com.azure.resourcemanager.machinelearningservices.models.MachineLearningComputes; +import com.azure.resourcemanager.machinelearningservices.models.Computes; import com.azure.resourcemanager.machinelearningservices.models.UnderlyingResourceAction; import com.fasterxml.jackson.annotation.JsonIgnore; -public final class MachineLearningComputesImpl implements MachineLearningComputes { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MachineLearningComputesImpl.class); +public final class ComputesImpl implements Computes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputesImpl.class); - private final MachineLearningComputesClient innerClient; + private final ComputesClient innerClient; private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - public MachineLearningComputesImpl( - MachineLearningComputesClient innerClient, + public ComputesImpl( + ComputesClient innerClient, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); return Utils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); } - public PagedIterable listByWorkspace( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, Context context) { PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, skip, context); + this.serviceClient().list(resourceGroupName, workspaceName, skip, context); return Utils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); } @@ -146,6 +146,21 @@ public Response restartWithResponse( return this.serviceClient().restartWithResponse(resourceGroupName, workspaceName, computeName, context); } + public void updateSchedules(String resourceGroupName, String workspaceName, String computeName) { + this.serviceClient().updateSchedules(resourceGroupName, workspaceName, computeName); + } + + public Response updateSchedulesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + ComputeSchedules parameters, + Context context) { + return this + .serviceClient() + .updateSchedulesWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + } + public ComputeResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -198,7 +213,7 @@ public Response getByIdWithResponse(String id, Context context) return this.getWithResponse(resourceGroupName, workspaceName, computeName, context); } - private MachineLearningComputesClient serviceClient() { + private ComputesClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainerResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainerResourceImpl.java new file mode 100644 index 000000000000..f632518bb95d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainerResourceImpl.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DataContainer; +import com.azure.resourcemanager.machinelearningservices.models.DataContainerResource; + +public final class DataContainerResourceImpl + implements DataContainerResource, DataContainerResource.Definition, DataContainerResource.Update { + private DataContainerResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public DataContainer properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DataContainerResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String resourceGroupName; + + private String workspaceName; + + public DataContainerResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public DataContainerResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getDataContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public DataContainerResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + DataContainerResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new DataContainerResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public DataContainerResourceImpl update() { + return this; + } + + public DataContainerResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getDataContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public DataContainerResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + DataContainerResourceImpl( + DataContainerResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "data"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public DataContainerResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getDataContainers() + .getWithResponse(name, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public DataContainerResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataContainers() + .getWithResponse(name, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public DataContainerResourceImpl withProperties(DataContainer properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainersClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainersClientImpl.java new file mode 100644 index 000000000000..374eb40749af --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainersClientImpl.java @@ -0,0 +1,914 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.DataContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DataContainerResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DataContainersClient. */ +public final class DataContainersClientImpl implements DataContainersClient { + private final ClientLogger logger = new ClientLogger(DataContainersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final DataContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of DataContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DataContainersClientImpl(AzureMachineLearningWorkspacesImpl 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 + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface DataContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @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}/data/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") DataContainerResourceInner body, + @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); + } + + /** + * 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 DataContainer entities. + */ + @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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + skip, + 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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @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.getApiVersion(), + skip, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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 DataContainer entities. + */ + @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 DataContainer entities. + */ + @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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @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 DataContainer entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + } + + /** + * Delete container. + * + * @param name Container 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param name Container name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete container. + * + * @param name Container 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete container. + * + * @param name Container 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String resourceGroupName, String workspaceName) { + deleteAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String name, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataContainerResourceInner get(String name, String resourceGroupName, String workspaceName) { + return getAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String name, String resourceGroupName, String workspaceName, DataContainerResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, String resourceGroupName, String workspaceName, DataContainerResourceInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String name, String resourceGroupName, String workspaceName, DataContainerResourceInner body) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataContainerResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, DataContainerResourceInner body) { + return createOrUpdateAsync(name, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 Response createOrUpdateWithResponse( + String name, String resourceGroupName, String workspaceName, DataContainerResourceInner body, Context context) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of DataContainer entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of DataContainer entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainersImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainersImpl.java new file mode 100644 index 000000000000..0ff1f1e9ff4f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataContainersImpl.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.DataContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DataContainerResource; +import com.azure.resourcemanager.machinelearningservices.models.DataContainers; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class DataContainersImpl implements DataContainers { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataContainersImpl.class); + + private final DataContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public DataContainersImpl( + DataContainersClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new DataContainerResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return Utils.mapPage(inner, inner1 -> new DataContainerResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + public DataContainerResource get(String name, String resourceGroupName, String workspaceName) { + DataContainerResourceInner inner = this.serviceClient().get(name, resourceGroupName, workspaceName); + if (inner != null) { + return new DataContainerResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataContainerResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataContainerResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + private DataContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public DataContainerResourceImpl define(String name) { + return new DataContainerResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionResourceImpl.java new file mode 100644 index 000000000000..a0559721e43e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionResourceImpl.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DataVersion; +import com.azure.resourcemanager.machinelearningservices.models.DataVersionResource; + +public final class DataVersionResourceImpl + implements DataVersionResource, DataVersionResource.Definition, DataVersionResource.Update { + private DataVersionResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public DataVersion properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DataVersionResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String version; + + private String resourceGroupName; + + private String workspaceName; + + public DataVersionResourceImpl withExistingData(String name, String resourceGroupName, String workspaceName) { + this.name = name; + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public DataVersionResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getDataVersions() + .createOrUpdateWithResponse( + name, version, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public DataVersionResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataVersions() + .createOrUpdateWithResponse(name, version, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + DataVersionResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new DataVersionResourceInner(); + this.serviceManager = serviceManager; + this.version = name; + } + + public DataVersionResourceImpl update() { + return this; + } + + public DataVersionResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getDataVersions() + .createOrUpdateWithResponse( + name, version, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public DataVersionResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataVersions() + .createOrUpdateWithResponse(name, version, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + DataVersionResourceImpl( + DataVersionResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "data"); + this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public DataVersionResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getDataVersions() + .getWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public DataVersionResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDataVersions() + .getWithResponse(name, version, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public DataVersionResourceImpl withProperties(DataVersion properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionsClientImpl.java new file mode 100644 index 000000000000..41ff7f670e8e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionsClientImpl.java @@ -0,0 +1,1048 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.DataVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DataVersionResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DataVersionsClient. */ +public final class DataVersionsClientImpl implements DataVersionsClient { + private final ClientLogger logger = new ClientLogger(DataVersionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final DataVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of DataVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DataVersionsClientImpl(AzureMachineLearningWorkspacesImpl 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 + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface DataVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @PathParam("version") String version, + @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}/data/{name}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("version") String version, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") DataVersionResourceInner body, + @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); + } + + /** + * List data versions. + * + * @param name Data name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=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 paginated list of DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + String tags) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + name, + this.client.getApiVersion(), + orderBy, + top, + skip, + tags, + 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 data versions. + * + * @param name Data name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=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 a paginated list of DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + String tags, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + name, + this.client.getApiVersion(), + orderBy, + top, + skip, + tags, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List data versions. + * + * @param name Data name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=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 paginated list of DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + String tags) { + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, tags), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List data versions. + * + * @param name Data 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 DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String name, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String tags = null; + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, tags), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List data versions. + * + * @param name Data name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=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 a paginated list of DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + String tags, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, tags, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List data versions. + * + * @param name Data 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 DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String name, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String tags = null; + return new PagedIterable<>(listAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, tags)); + } + + /** + * List data versions. + * + * @param name Data name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=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 a paginated list of DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + String tags, + Context context) { + return new PagedIterable<>( + listAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, tags, context)); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String version, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, version, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String version, String resourceGroupName, String workspaceName) { + deleteAsync(name, version, resourceGroupName, workspaceName).block(); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, version, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String name, String version, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, version, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DataVersionResourceInner get(String name, String version, String resourceGroupName, String workspaceName) { + return getAsync(name, version, resourceGroupName, workspaceName).block(); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, version, resourceGroupName, workspaceName, context).block(); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, String version, String resourceGroupName, String workspaceName, DataVersionResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, + String version, + String resourceGroupName, + String workspaceName, + DataVersionResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono createOrUpdateAsync( + String name, String version, String resourceGroupName, String workspaceName, DataVersionResourceInner body) { + return createOrUpdateWithResponseAsync(name, version, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 DataVersionResourceInner createOrUpdate( + String name, String version, String resourceGroupName, String workspaceName, DataVersionResourceInner body) { + return createOrUpdateAsync(name, version, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 Response createOrUpdateWithResponse( + String name, + String version, + String resourceGroupName, + String workspaceName, + DataVersionResourceInner body, + Context context) { + return createOrUpdateWithResponseAsync(name, version, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of DataVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionsImpl.java new file mode 100644 index 000000000000..768d1603dcba --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DataVersionsImpl.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.DataVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DataVersionResource; +import com.azure.resourcemanager.machinelearningservices.models.DataVersions; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class DataVersionsImpl implements DataVersions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataVersionsImpl.class); + + private final DataVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public DataVersionsImpl( + DataVersionsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String name, String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(name, resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new DataVersionResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + String tags, + Context context) { + PagedIterable inner = + this.serviceClient().list(name, resourceGroupName, workspaceName, orderBy, top, skip, tags, context); + return Utils.mapPage(inner, inner1 -> new DataVersionResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String version, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, version, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + public DataVersionResource get(String name, String version, String resourceGroupName, String workspaceName) { + DataVersionResourceInner inner = this.serviceClient().get(name, version, resourceGroupName, workspaceName); + if (inner != null) { + return new DataVersionResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, version, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DataVersionResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DataVersionResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "data"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'data'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + private DataVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public DataVersionResourceImpl define(String name) { + return new DataVersionResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastorePropertiesResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastorePropertiesResourceImpl.java new file mode 100644 index 000000000000..e69e15adc411 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastorePropertiesResourceImpl.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastorePropertiesResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DatastoreProperties; +import com.azure.resourcemanager.machinelearningservices.models.DatastorePropertiesResource; +import com.azure.resourcemanager.machinelearningservices.models.DatastoreSecrets; + +public final class DatastorePropertiesResourceImpl + implements DatastorePropertiesResource, DatastorePropertiesResource.Definition, DatastorePropertiesResource.Update { + private DatastorePropertiesResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public DatastoreProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DatastorePropertiesResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String resourceGroupName; + + private String workspaceName; + + private Boolean createSkipValidation; + + private Boolean updateSkipValidation; + + public DatastorePropertiesResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public DatastorePropertiesResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getDatastores() + .createOrUpdateWithResponse( + name, resourceGroupName, workspaceName, this.innerModel(), createSkipValidation, Context.NONE) + .getValue(); + return this; + } + + public DatastorePropertiesResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDatastores() + .createOrUpdateWithResponse( + name, resourceGroupName, workspaceName, this.innerModel(), createSkipValidation, context) + .getValue(); + return this; + } + + DatastorePropertiesResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new DatastorePropertiesResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + this.createSkipValidation = null; + } + + public DatastorePropertiesResourceImpl update() { + this.updateSkipValidation = null; + return this; + } + + public DatastorePropertiesResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getDatastores() + .createOrUpdateWithResponse( + name, resourceGroupName, workspaceName, this.innerModel(), updateSkipValidation, Context.NONE) + .getValue(); + return this; + } + + public DatastorePropertiesResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDatastores() + .createOrUpdateWithResponse( + name, resourceGroupName, workspaceName, this.innerModel(), updateSkipValidation, context) + .getValue(); + return this; + } + + DatastorePropertiesResourceImpl( + DatastorePropertiesResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "datastores"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public DatastorePropertiesResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getDatastores() + .getWithResponse(name, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public DatastorePropertiesResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDatastores() + .getWithResponse(name, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public DatastoreSecrets listSecrets() { + return serviceManager.datastores().listSecrets(name, resourceGroupName, workspaceName); + } + + public Response listSecretsWithResponse(Context context) { + return serviceManager.datastores().listSecretsWithResponse(name, resourceGroupName, workspaceName, context); + } + + public DatastorePropertiesResourceImpl withProperties(DatastoreProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public DatastorePropertiesResourceImpl withSkipValidation(Boolean skipValidation) { + if (isInCreateMode()) { + this.createSkipValidation = skipValidation; + return this; + } else { + this.updateSkipValidation = skipValidation; + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoreSecretsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoreSecretsImpl.java new file mode 100644 index 000000000000..1abcd97968af --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoreSecretsImpl.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import com.azure.resourcemanager.machinelearningservices.models.DatastoreSecrets; + +public final class DatastoreSecretsImpl implements DatastoreSecrets { + private DatastoreSecretsInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + DatastoreSecretsImpl( + DatastoreSecretsInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public DatastoreSecretsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoresClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoresClientImpl.java new file mode 100644 index 000000000000..efa82e9d9cb3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoresClientImpl.java @@ -0,0 +1,1288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.CollectionFormat; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.resourcemanager.machinelearningservices.fluent.DatastoresClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastorePropertiesResourceInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import com.azure.resourcemanager.machinelearningservices.models.DatastorePropertiesResourceArmPaginatedResult; +import java.util.List; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DatastoresClient. */ +public final class DatastoresClientImpl implements DatastoresClient { + private final ClientLogger logger = new ClientLogger(DatastoresClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final DatastoresService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of DatastoresClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DatastoresClientImpl(AzureMachineLearningWorkspacesImpl 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 + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface DatastoresService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @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}/datastores/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @QueryParam("skipValidation") Boolean skipValidation, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") DatastorePropertiesResourceInner body, + @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("name") String name, + @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("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List datastores. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DatastoreProperties entities. + */ + @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.")); + } + final String accept = "application/json"; + String namesConverted = + JacksonAdapter.createDefaultSerializerAdapter().serializeList(names, CollectionFormat.CSV); + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + skip, + count, + isDefault, + namesConverted, + searchText, + orderBy, + orderByAsc, + 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 datastores. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DatastoreProperties entities. + */ + @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 = + JacksonAdapter.createDefaultSerializerAdapter().serializeList(names, CollectionFormat.CSV); + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + skip, + count, + isDefault, + namesConverted, + searchText, + orderBy, + orderByAsc, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List datastores. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DatastoreProperties entities. + */ + @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)); + } + + /** + * List datastores. + * + * @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 DatastoreProperties entities. + */ + @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)); + } + + /** + * List datastores. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DatastoreProperties entities. + */ + @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)); + } + + /** + * List datastores. + * + * @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 DatastoreProperties entities. + */ + @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)); + } + + /** + * List datastores. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DatastoreProperties entities. + */ + @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)); + } + + /** + * Delete datastore. + * + * @param name Datastore 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete datastore. + * + * @param name Datastore name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete datastore. + * + * @param name Datastore 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete datastore. + * + * @param name Datastore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String resourceGroupName, String workspaceName) { + deleteAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Delete datastore. + * + * @param name Datastore name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get datastore. + * + * @param name Datastore 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 datastore. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get datastore. + * + * @param name Datastore name. + * @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 datastore. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get datastore. + * + * @param name Datastore 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 datastore. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String name, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get datastore. + * + * @param name Datastore 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 datastore. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatastorePropertiesResourceInner get(String name, String resourceGroupName, String workspaceName) { + return getAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Get datastore. + * + * @param name Datastore name. + * @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 datastore. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Create or update datastore. + * + * @param name Datastore name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String name, + String resourceGroupName, + String workspaceName, + DatastorePropertiesResourceInner body, + Boolean skipValidation) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + skipValidation, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update datastore. + * + * @param name Datastore name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String name, + String resourceGroupName, + String workspaceName, + DatastorePropertiesResourceInner 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + skipValidation, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update datastore. + * + * @param name Datastore name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String name, + String resourceGroupName, + String workspaceName, + DatastorePropertiesResourceInner body, + Boolean skipValidation) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body, skipValidation) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update datastore. + * + * @param name Datastore name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String name, String resourceGroupName, String workspaceName, DatastorePropertiesResourceInner body) { + final Boolean skipValidation = null; + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body, skipValidation) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update datastore. + * + * @param name Datastore name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatastorePropertiesResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, DatastorePropertiesResourceInner body) { + final Boolean skipValidation = null; + return createOrUpdateAsync(name, resourceGroupName, workspaceName, body, skipValidation).block(); + } + + /** + * Create or update datastore. + * + * @param name Datastore name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String name, + String resourceGroupName, + String workspaceName, + DatastorePropertiesResourceInner body, + Boolean skipValidation, + Context context) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body, skipValidation, context) + .block(); + } + + /** + * Get datastore secrets. + * + * @param name Datastore 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 datastore secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSecretsWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .listSecrets( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get datastore secrets. + * + * @param name Datastore name. + * @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 datastore secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSecretsWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .listSecrets( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get datastore secrets. + * + * @param name Datastore 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 datastore secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSecretsAsync(String name, String resourceGroupName, String workspaceName) { + return listSecretsWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get datastore secrets. + * + * @param name Datastore 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 datastore secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatastoreSecretsInner listSecrets(String name, String resourceGroupName, String workspaceName) { + return listSecretsAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Get datastore secrets. + * + * @param name Datastore name. + * @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 datastore secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSecretsWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return listSecretsWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of DatastoreProperties entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of DatastoreProperties entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoresImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoresImpl.java new file mode 100644 index 000000000000..a7bb7379cae0 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DatastoresImpl.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.DatastoresClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastorePropertiesResourceInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import com.azure.resourcemanager.machinelearningservices.models.DatastorePropertiesResource; +import com.azure.resourcemanager.machinelearningservices.models.DatastoreSecrets; +import com.azure.resourcemanager.machinelearningservices.models.Datastores; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.List; + +public final class DatastoresImpl implements Datastores { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoresImpl.class); + + private final DatastoresClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public DatastoresImpl( + DatastoresClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new DatastorePropertiesResourceImpl(inner1, 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 Utils.mapPage(inner, inner1 -> new DatastorePropertiesResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + public DatastorePropertiesResource get(String name, String resourceGroupName, String workspaceName) { + DatastorePropertiesResourceInner inner = this.serviceClient().get(name, resourceGroupName, workspaceName); + if (inner != null) { + return new DatastorePropertiesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DatastorePropertiesResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DatastoreSecrets listSecrets(String name, String resourceGroupName, String workspaceName) { + DatastoreSecretsInner inner = this.serviceClient().listSecrets(name, resourceGroupName, workspaceName); + if (inner != null) { + return new DatastoreSecretsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSecretsWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().listSecretsWithResponse(name, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DatastoreSecretsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DatastorePropertiesResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "datastores"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "datastores"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "datastores"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "datastores"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + private DatastoresClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public DatastorePropertiesResourceImpl define(String name) { + return new DatastorePropertiesResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DeploymentLogsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DeploymentLogsImpl.java new file mode 100644 index 000000000000..b59c670bae27 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/DeploymentLogsImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.DeploymentLogsInner; +import com.azure.resourcemanager.machinelearningservices.models.DeploymentLogs; + +public final class DeploymentLogsImpl implements DeploymentLogs { + private DeploymentLogsInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + DeploymentLogsImpl( + DeploymentLogsInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String content() { + return this.innerModel().content(); + } + + public DeploymentLogsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EndpointAuthKeysImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EndpointAuthKeysImpl.java new file mode 100644 index 000000000000..6a52de7e43a6 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EndpointAuthKeysImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthKeys; + +public final class EndpointAuthKeysImpl implements EndpointAuthKeys { + private EndpointAuthKeysInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + EndpointAuthKeysImpl( + EndpointAuthKeysInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String primaryKey() { + return this.innerModel().primaryKey(); + } + + public String secondaryKey() { + return this.innerModel().secondaryKey(); + } + + public EndpointAuthKeysInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EndpointAuthTokenImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EndpointAuthTokenImpl.java new file mode 100644 index 000000000000..e38ad68e1c22 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EndpointAuthTokenImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthTokenInner; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthToken; + +public final class EndpointAuthTokenImpl implements EndpointAuthToken { + private EndpointAuthTokenInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + EndpointAuthTokenImpl( + EndpointAuthTokenInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String accessToken() { + return this.innerModel().accessToken(); + } + + public Long expiryTimeUtc() { + return this.innerModel().expiryTimeUtc(); + } + + public Long refreshAfterTimeUtc() { + return this.innerModel().refreshAfterTimeUtc(); + } + + public String tokenType() { + return this.innerModel().tokenType(); + } + + public EndpointAuthTokenInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainerResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainerResourceImpl.java new file mode 100644 index 000000000000..1d8b71e05b82 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainerResourceImpl.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentContainer; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentContainerResource; + +public final class EnvironmentContainerResourceImpl + implements EnvironmentContainerResource, + EnvironmentContainerResource.Definition, + EnvironmentContainerResource.Update { + private EnvironmentContainerResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public EnvironmentContainer properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public EnvironmentContainerResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String resourceGroupName; + + private String workspaceName; + + public EnvironmentContainerResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public EnvironmentContainerResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public EnvironmentContainerResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + EnvironmentContainerResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new EnvironmentContainerResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public EnvironmentContainerResourceImpl update() { + return this; + } + + public EnvironmentContainerResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public EnvironmentContainerResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + EnvironmentContainerResourceImpl( + EnvironmentContainerResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public EnvironmentContainerResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentContainers() + .getWithResponse(name, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public EnvironmentContainerResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentContainers() + .getWithResponse(name, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public EnvironmentContainerResourceImpl withProperties(EnvironmentContainer properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainersClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainersClientImpl.java new file mode 100644 index 000000000000..c076b984b1bd --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainersClientImpl.java @@ -0,0 +1,925 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.EnvironmentContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentContainerResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in EnvironmentContainersClient. */ +public final class EnvironmentContainersClientImpl implements EnvironmentContainersClient { + private final ClientLogger logger = new ClientLogger(EnvironmentContainersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final EnvironmentContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of EnvironmentContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl 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. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface EnvironmentContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @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}/environments/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") EnvironmentContainerResourceInner body, + @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); + } + + /** + * 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 EnvironmentContainer entities. + */ + @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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + skip, + 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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @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.getApiVersion(), + skip, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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 EnvironmentContainer entities. + */ + @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 EnvironmentContainer entities. + */ + @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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @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 EnvironmentContainer entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + } + + /** + * Delete container. + * + * @param name Container 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param name Container name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete container. + * + * @param name Container 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete container. + * + * @param name Container 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String resourceGroupName, String workspaceName) { + deleteAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String name, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerResourceInner get(String name, String resourceGroupName, String workspaceName) { + return getAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String name, String resourceGroupName, String workspaceName, EnvironmentContainerResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, + String resourceGroupName, + String workspaceName, + EnvironmentContainerResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String name, String resourceGroupName, String workspaceName, EnvironmentContainerResourceInner body) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, EnvironmentContainerResourceInner body) { + return createOrUpdateAsync(name, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 Response createOrUpdateWithResponse( + String name, + String resourceGroupName, + String workspaceName, + EnvironmentContainerResourceInner body, + Context context) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of EnvironmentContainer entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of EnvironmentContainer entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainersImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainersImpl.java new file mode 100644 index 000000000000..fe7e6f840a30 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentContainersImpl.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.EnvironmentContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentContainerResource; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentContainers; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class EnvironmentContainersImpl implements EnvironmentContainers { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentContainersImpl.class); + + private final EnvironmentContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public EnvironmentContainersImpl( + EnvironmentContainersClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return Utils.mapPage(inner, inner1 -> new EnvironmentContainerResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + public EnvironmentContainerResource get(String name, String resourceGroupName, String workspaceName) { + EnvironmentContainerResourceInner inner = this.serviceClient().get(name, resourceGroupName, workspaceName); + if (inner != null) { + return new EnvironmentContainerResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentContainerResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentContainerResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "environments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "environments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "environments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "environments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + private EnvironmentContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public EnvironmentContainerResourceImpl define(String name) { + return new EnvironmentContainerResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionResourceImpl.java new file mode 100644 index 000000000000..f2e5756b035e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionResourceImpl.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentSpecificationVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentSpecificationVersion; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentSpecificationVersionResource; + +public final class EnvironmentSpecificationVersionResourceImpl + implements EnvironmentSpecificationVersionResource, + EnvironmentSpecificationVersionResource.Definition, + EnvironmentSpecificationVersionResource.Update { + private EnvironmentSpecificationVersionResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public EnvironmentSpecificationVersion properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public EnvironmentSpecificationVersionResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String version; + + private String resourceGroupName; + + private String workspaceName; + + public EnvironmentSpecificationVersionResourceImpl withExistingEnvironment( + String name, String resourceGroupName, String workspaceName) { + this.name = name; + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public EnvironmentSpecificationVersionResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentSpecificationVersions() + .createOrUpdateWithResponse( + name, version, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public EnvironmentSpecificationVersionResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentSpecificationVersions() + .createOrUpdateWithResponse(name, version, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + EnvironmentSpecificationVersionResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new EnvironmentSpecificationVersionResourceInner(); + this.serviceManager = serviceManager; + this.version = name; + } + + public EnvironmentSpecificationVersionResourceImpl update() { + return this; + } + + public EnvironmentSpecificationVersionResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentSpecificationVersions() + .createOrUpdateWithResponse( + name, version, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public EnvironmentSpecificationVersionResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentSpecificationVersions() + .createOrUpdateWithResponse(name, version, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + EnvironmentSpecificationVersionResourceImpl( + EnvironmentSpecificationVersionResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); + this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public EnvironmentSpecificationVersionResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentSpecificationVersions() + .getWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public EnvironmentSpecificationVersionResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getEnvironmentSpecificationVersions() + .getWithResponse(name, version, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public EnvironmentSpecificationVersionResourceImpl withProperties(EnvironmentSpecificationVersion properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionsClientImpl.java new file mode 100644 index 000000000000..e76c4afb512f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionsClientImpl.java @@ -0,0 +1,1047 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.EnvironmentSpecificationVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentSpecificationVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentSpecificationVersionResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in EnvironmentSpecificationVersionsClient. + */ +public final class EnvironmentSpecificationVersionsClientImpl implements EnvironmentSpecificationVersionsClient { + private final ClientLogger logger = new ClientLogger(EnvironmentSpecificationVersionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final EnvironmentSpecificationVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of EnvironmentSpecificationVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EnvironmentSpecificationVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = + RestProxy + .create( + EnvironmentSpecificationVersionsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentSpecificationVersions to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface EnvironmentSpecificationVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @PathParam("version") String version, + @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}/environments/{name}/versions" + + "/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("version") String version, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" + + "/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") EnvironmentSpecificationVersionResourceInner body, + @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); + } + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String name, String resourceGroupName, String workspaceName, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + name, + this.client.getApiVersion(), + orderBy, + top, + skip, + 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 versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String name, + String resourceGroupName, + String workspaceName, + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + name, + this.client.getApiVersion(), + orderBy, + top, + skip, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, String resourceGroupName, String workspaceName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param name Container 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 EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List versions. + * + * @param name Container 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 EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String name, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(listAsync(name, resourceGroupName, workspaceName, orderBy, top, skip)); + } + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedIterable<>(listAsync(name, resourceGroupName, workspaceName, orderBy, top, skip, context)); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String version, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, version, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String version, String resourceGroupName, String workspaceName) { + deleteAsync(name, version, resourceGroupName, workspaceName).block(); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, version, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String name, String version, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, version, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentSpecificationVersionResourceInner get( + String name, String version, String resourceGroupName, String workspaceName) { + return getAsync(name, version, resourceGroupName, workspaceName).block(); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, version, resourceGroupName, workspaceName, context).block(); + } + + /** + * Creates or updates an EnvironmentSpecificationVersion. + * + * @param name Name of EnvironmentSpecificationVersion. + * @param version Version of EnvironmentSpecificationVersion. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Definition of EnvironmentSpecificationVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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) + private Mono> createOrUpdateWithResponseAsync( + String name, + String version, + String resourceGroupName, + String workspaceName, + EnvironmentSpecificationVersionResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an EnvironmentSpecificationVersion. + * + * @param name Name of EnvironmentSpecificationVersion. + * @param version Version of EnvironmentSpecificationVersion. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Definition of EnvironmentSpecificationVersion. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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) + private Mono> createOrUpdateWithResponseAsync( + String name, + String version, + String resourceGroupName, + String workspaceName, + EnvironmentSpecificationVersionResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Creates or updates an EnvironmentSpecificationVersion. + * + * @param name Name of EnvironmentSpecificationVersion. + * @param version Version of EnvironmentSpecificationVersion. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Definition of EnvironmentSpecificationVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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) + private Mono createOrUpdateAsync( + String name, + String version, + String resourceGroupName, + String workspaceName, + EnvironmentSpecificationVersionResourceInner body) { + return createOrUpdateWithResponseAsync(name, version, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates or updates an EnvironmentSpecificationVersion. + * + * @param name Name of EnvironmentSpecificationVersion. + * @param version Version of EnvironmentSpecificationVersion. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Definition of EnvironmentSpecificationVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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 EnvironmentSpecificationVersionResourceInner createOrUpdate( + String name, + String version, + String resourceGroupName, + String workspaceName, + EnvironmentSpecificationVersionResourceInner body) { + return createOrUpdateAsync(name, version, resourceGroupName, workspaceName, body).block(); + } + + /** + * Creates or updates an EnvironmentSpecificationVersion. + * + * @param name Name of EnvironmentSpecificationVersion. + * @param version Version of EnvironmentSpecificationVersion. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body Definition of EnvironmentSpecificationVersion. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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 Response createOrUpdateWithResponse( + String name, + String version, + String resourceGroupName, + String workspaceName, + EnvironmentSpecificationVersionResourceInner body, + Context context) { + return createOrUpdateWithResponseAsync(name, version, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of EnvironmentSpecificationVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionsImpl.java new file mode 100644 index 000000000000..45d5cea9ada6 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/EnvironmentSpecificationVersionsImpl.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.EnvironmentSpecificationVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentSpecificationVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentSpecificationVersionResource; +import com.azure.resourcemanager.machinelearningservices.models.EnvironmentSpecificationVersions; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class EnvironmentSpecificationVersionsImpl implements EnvironmentSpecificationVersions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentSpecificationVersionsImpl.class); + + private final EnvironmentSpecificationVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public EnvironmentSpecificationVersionsImpl( + EnvironmentSpecificationVersionsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String name, String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(name, resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new EnvironmentSpecificationVersionResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + PagedIterable inner = + this.serviceClient().list(name, resourceGroupName, workspaceName, orderBy, top, skip, context); + return Utils.mapPage(inner, inner1 -> new EnvironmentSpecificationVersionResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String version, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, version, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + public EnvironmentSpecificationVersionResource get( + String name, String version, String resourceGroupName, String workspaceName) { + EnvironmentSpecificationVersionResourceInner inner = + this.serviceClient().get(name, version, resourceGroupName, workspaceName); + if (inner != null) { + return new EnvironmentSpecificationVersionResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, version, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentSpecificationVersionResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentSpecificationVersionResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "environments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "environments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "environments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "environments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'environments'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + private EnvironmentSpecificationVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public EnvironmentSpecificationVersionResourceImpl define(String name) { + return new EnvironmentSpecificationVersionResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ExportSummaryImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ExportSummaryImpl.java new file mode 100644 index 000000000000..87637010dd29 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ExportSummaryImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearningservices.models.ExportSummary; +import java.time.OffsetDateTime; + +public final class ExportSummaryImpl implements ExportSummary { + private ExportSummaryInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + ExportSummaryImpl( + ExportSummaryInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public OffsetDateTime endTimeUtc() { + return this.innerModel().endTimeUtc(); + } + + public Long exportedRowCount() { + return this.innerModel().exportedRowCount(); + } + + public String labelingJobId() { + return this.innerModel().labelingJobId(); + } + + public OffsetDateTime startTimeUtc() { + return this.innerModel().startTimeUtc(); + } + + public ExportSummaryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobBaseResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobBaseResourceImpl.java new file mode 100644 index 000000000000..a89ee50d97bc --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobBaseResourceImpl.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.JobBaseResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.JobBase; +import com.azure.resourcemanager.machinelearningservices.models.JobBaseResource; + +public final class JobBaseResourceImpl implements JobBaseResource, JobBaseResource.Definition, JobBaseResource.Update { + private JobBaseResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public JobBase properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public JobBaseResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String id; + + private String resourceGroupName; + + private String workspaceName; + + public JobBaseResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public JobBaseResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getJobs() + .createOrUpdateWithResponse(id, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public JobBaseResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getJobs() + .createOrUpdateWithResponse(id, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + JobBaseResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new JobBaseResourceInner(); + this.serviceManager = serviceManager; + this.id = name; + } + + public JobBaseResourceImpl update() { + return this; + } + + public JobBaseResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getJobs() + .createOrUpdateWithResponse(id, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public JobBaseResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getJobs() + .createOrUpdateWithResponse(id, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + JobBaseResourceImpl( + JobBaseResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.id = Utils.getValueFromIdByName(innerObject.id(), "jobs"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public JobBaseResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getJobs() + .getWithResponse(id, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public JobBaseResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getJobs() + .getWithResponse(id, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public void cancel() { + serviceManager.jobs().cancel(id, resourceGroupName, workspaceName); + } + + public Response cancelWithResponse(Context context) { + return serviceManager.jobs().cancelWithResponse(id, resourceGroupName, workspaceName, context); + } + + public JobBaseResourceImpl withProperties(JobBase properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobsClientImpl.java similarity index 56% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesClientImpl.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobsClientImpl.java index d7156fbcd189..766c204694b7 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesClientImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobsClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -32,115 +33,121 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningServicesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequest; -import com.azure.resourcemanager.machinelearningservices.models.OrderString; -import com.azure.resourcemanager.machinelearningservices.models.PaginatedServiceList; +import com.azure.resourcemanager.machinelearningservices.fluent.JobsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.JobBaseResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.JobBaseResourceArmPaginatedResult; 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 MachineLearningServicesClient. */ -public final class MachineLearningServicesClientImpl implements MachineLearningServicesClient { - private final ClientLogger logger = new ClientLogger(MachineLearningServicesClientImpl.class); +/** An instance of this class provides access to all the operations defined in JobsClient. */ +public final class JobsClientImpl implements JobsClient { + private final ClientLogger logger = new ClientLogger(JobsClientImpl.class); /** The proxy service used to perform REST calls. */ - private final MachineLearningServicesService service; + private final JobsService service; /** The service client containing this operation class. */ private final AzureMachineLearningWorkspacesImpl client; /** - * Initializes an instance of MachineLearningServicesClientImpl. + * Initializes an instance of JobsClientImpl. * * @param client the instance of the service client containing this operation class. */ - MachineLearningServicesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create(MachineLearningServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + JobsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesMachineLearningServices to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningWorkspacesJobs to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") - private interface MachineLearningServicesService { + private interface JobsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services") + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace( + Mono> list( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("modelId") String modelId, - @QueryParam("modelName") String modelName, - @QueryParam("tag") String tag, + @QueryParam("jobType") String jobType, @QueryParam("tags") String tags, - @QueryParam("properties") String properties, - @QueryParam("runId") String runId, - @QueryParam("expand") Boolean expand, - @QueryParam("orderby") OrderString orderby, + @QueryParam("tag") String tag, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Get( + @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services/{serviceName}") - @ExpectedResponses({200}) + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( + Mono>> delete( @HostParam("$host") String endpoint, + @PathParam("id") String id, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @PathParam("serviceName") String serviceName, - @QueryParam("expand") Boolean expand, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) - @Delete( + @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services/{serviceName}") - @ExpectedResponses({200, 204}) + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( + Mono> get( @HostParam("$host") String endpoint, + @PathParam("id") String id, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @PathParam("serviceName") String serviceName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services/{serviceName}") + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( + Mono> createOrUpdate( @HostParam("$host") String endpoint, + @PathParam("id") String id, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") JobBaseResourceInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> cancel( + @HostParam("$host") String endpoint, + @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @PathParam("serviceName") String serviceName, - @BodyParam("application/json") CreateServiceRequest properties, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @@ -148,7 +155,7 @@ Mono>> createOrUpdate( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspaceNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -156,39 +163,22 @@ Mono> listByWorkspaceNext( } /** - * Gets services in specified workspace. + * Lists Jobs in the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. 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 services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. + * @param jobType Type of job to be returned. + * @param tags Tags for job to be returned. + * @param tag Jobs returned will have this tag key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - String modelId, - String modelName, - String tag, - String tags, - String properties, - String runId, - Boolean expand, - OrderString orderby) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String skip, String jobType, String tags, String tag) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -213,24 +203,19 @@ private Mono> listByWorkspaceSinglePageAsync .withContext( context -> service - .listByWorkspace( + .list( this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, this.client.getApiVersion(), skip, - modelId, - modelName, - tag, + jobType, tags, - properties, - runId, - expand, - orderby, + tag, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, accept, context)) - .>map( + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -243,40 +228,28 @@ private Mono> listByWorkspaceSinglePageAsync } /** - * Gets services in specified workspace. + * Lists Jobs in the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. 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 services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. + * @param jobType Type of job to be returned. + * @param tags Tags for job to be returned. + * @param tag Jobs returned will have this tag key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( + private Mono> listSinglePageAsync( String resourceGroupName, String workspaceName, String skip, - String modelId, - String modelName, - String tag, + String jobType, String tags, - String properties, - String runId, - Boolean expand, - OrderString orderby, + String tag, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -300,21 +273,16 @@ private Mono> listByWorkspaceSinglePageAsync final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspace( + .list( this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, this.client.getApiVersion(), skip, - modelId, - modelName, - tag, + jobType, tags, - properties, - runId, - expand, - orderby, + tag, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, accept, context) .map( @@ -329,257 +297,146 @@ private Mono> listByWorkspaceSinglePageAsync } /** - * Gets services in specified workspace. + * Lists Jobs in the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. 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 services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. + * @param jobType Type of job to be returned. + * @param tags Tags for job to be returned. + * @param tag Jobs returned will have this tag key. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync( - String resourceGroupName, - String workspaceName, - String skip, - String modelId, - String modelName, - String tag, - String tags, - String properties, - String runId, - Boolean expand, - OrderString orderby) { + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skip, String jobType, String tags, String tag) { return new PagedFlux<>( - () -> - listByWorkspaceSinglePageAsync( - resourceGroupName, - workspaceName, - skip, - modelId, - modelName, - tag, - tags, - properties, - runId, - expand, - orderby), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tags, tag), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets services in specified workspace. + * Lists Jobs in the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 services in specified workspace. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; - final String modelId = null; - final String modelName = null; - final String tag = null; + final String jobType = null; final String tags = null; - final String properties = null; - final String runId = null; - final Boolean expand = null; - final OrderString orderby = null; + final String tag = null; return new PagedFlux<>( - () -> - listByWorkspaceSinglePageAsync( - resourceGroupName, - workspaceName, - skip, - modelId, - modelName, - tag, - tags, - properties, - runId, - expand, - orderby), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tags, tag), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets services in specified workspace. + * Lists Jobs in the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. 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 services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. + * @param jobType Type of job to be returned. + * @param tags Tags for job to be returned. + * @param tag Jobs returned will have this tag key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync( + private PagedFlux listAsync( String resourceGroupName, String workspaceName, String skip, - String modelId, - String modelName, - String tag, + String jobType, String tags, - String properties, - String runId, - Boolean expand, - OrderString orderby, + String tag, Context context) { return new PagedFlux<>( - () -> - listByWorkspaceSinglePageAsync( - resourceGroupName, - workspaceName, - skip, - modelId, - modelName, - tag, - tags, - properties, - runId, - expand, - orderby, - context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tags, tag, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Gets services in specified workspace. + * Lists Jobs in the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 services in specified workspace. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { + public PagedIterable list(String resourceGroupName, String workspaceName) { final String skip = null; - final String modelId = null; - final String modelName = null; - final String tag = null; + final String jobType = null; final String tags = null; - final String properties = null; - final String runId = null; - final Boolean expand = null; - final OrderString orderby = null; - return new PagedIterable<>( - listByWorkspaceAsync( - resourceGroupName, - workspaceName, - skip, - modelId, - modelName, - tag, - tags, - properties, - runId, - expand, - orderby)); + final String tag = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, jobType, tags, tag)); } /** - * Gets services in specified workspace. + * Lists Jobs in the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. 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 services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. + * @param jobType Type of job to be returned. + * @param tags Tags for job to be returned. + * @param tag Jobs returned will have this tag key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, - String modelId, - String modelName, - String tag, + String jobType, String tags, - String properties, - String runId, - Boolean expand, - OrderString orderby, + String tag, Context context) { - return new PagedIterable<>( - listByWorkspaceAsync( - resourceGroupName, - workspaceName, - skip, - modelId, - modelName, - tag, - tags, - properties, - runId, - expand, - orderby, - context)); + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, jobType, tags, tag, context)); } /** - * Get a Service by name. + * Deletes a Job (asynchronous). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String serviceName, Boolean expand) { + private Mono>> deleteWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( @@ -593,49 +450,47 @@ private Mono> getWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .get( + .delete( this.client.getEndpoint(), + id, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), - serviceName, - expand, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a Service by name. + * Deletes a Job (asynchronous). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String serviceName, Boolean expand, Context context) { + private Mono>> deleteWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( @@ -649,131 +504,187 @@ private Mono> getWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .get( + .delete( this.client.getEndpoint(), + id, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), - serviceName, - expand, accept, context); } /** - * Get a Service by name. + * Deletes a Job (asynchronous). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String serviceName, Boolean expand) { - return getWithResponseAsync(resourceGroupName, workspaceName, serviceName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + private PollerFlux, Void> beginDeleteAsync( + String id, String resourceGroupName, String workspaceName) { + Mono>> mono = deleteWithResponseAsync(id, resourceGroupName, workspaceName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); } /** - * Get a Service by name. + * Deletes a Job (asynchronous). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String serviceName) { - final Boolean expand = null; - return getWithResponseAsync(resourceGroupName, workspaceName, serviceName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + private PollerFlux, Void> beginDeleteAsync( + String id, String resourceGroupName, String workspaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(id, resourceGroupName, workspaceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } /** - * Get a Service by name. + * Deletes a Job (asynchronous). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServiceResourceInner get(String resourceGroupName, String workspaceName, String serviceName) { - final Boolean expand = null; - return getAsync(resourceGroupName, workspaceName, serviceName, expand).block(); + public SyncPoller, Void> beginDelete(String id, String resourceGroupName, String workspaceName) { + return beginDeleteAsync(id, resourceGroupName, workspaceName).getSyncPoller(); } /** - * Get a Service by name. + * Deletes a Job (asynchronous). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String serviceName, Boolean expand, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, serviceName, expand, context).block(); + public SyncPoller, Void> beginDelete( + String id, String resourceGroupName, String workspaceName, Context context) { + return beginDeleteAsync(id, resourceGroupName, workspaceName, context).getSyncPoller(); } /** - * Delete a specific Service.. + * Deletes a Job (asynchronous). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String serviceName) { + private Mono deleteAsync(String id, String resourceGroupName, String workspaceName) { + return beginDeleteAsync(id, resourceGroupName, workspaceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String id, String resourceGroupName, String workspaceName, Context context) { + return beginDeleteAsync(id, resourceGroupName, workspaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String id, String resourceGroupName, String workspaceName) { + deleteAsync(id, resourceGroupName, workspaceName).block(); + } + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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 delete(String id, String resourceGroupName, String workspaceName, Context context) { + deleteAsync(id, resourceGroupName, workspaceName, context).block(); + } + + /** + * Gets a Job by name/id. + * + * @param id The name and identifier for the Job. + * @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 Job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( @@ -787,47 +698,47 @@ private Mono> deleteWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service - .delete( + .get( this.client.getEndpoint(), + id, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), - serviceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a specific Service.. + * Gets a Job by name/id. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return a Job by name/id. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String serviceName, Context context) { + private Mono> getWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( @@ -841,95 +752,102 @@ private Mono> deleteWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .delete( + .get( this.client.getEndpoint(), + id, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), - serviceName, accept, context); } /** - * Delete a specific Service.. + * Gets a Job by name/id. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return a Job by name/id. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String serviceName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, serviceName) - .flatMap((Response res) -> Mono.empty()); + private Mono getAsync(String id, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(id, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); } /** - * Delete a specific Service.. + * Gets a Job by name/id. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public void delete(String resourceGroupName, String workspaceName, String serviceName) { - deleteAsync(resourceGroupName, workspaceName, serviceName).block(); + public JobBaseResourceInner get(String id, String resourceGroupName, String workspaceName) { + return getAsync(id, resourceGroupName, workspaceName).block(); } /** - * Delete a specific Service.. + * Gets a Job by name/id. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 Job by name/id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String serviceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, serviceName, context).block(); + public Response getWithResponse( + String id, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(id, resourceGroupName, workspaceName, context).block(); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Creates and executes a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. + * @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 machine Learning service object wrapped into ARM resource envelope. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties) { + private Mono> createOrUpdateWithResponseAsync( + String id, String resourceGroupName, String workspaceName, JobBaseResourceInner body) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( @@ -943,13 +861,10 @@ private Mono>> createOrUpdateWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { - properties.validate(); + body.validate(); } final String accept = "application/json"; return FluxUtil @@ -958,44 +873,42 @@ private Mono>> createOrUpdateWithResponseAsync( service .createOrUpdate( this.client.getEndpoint(), + id, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), - serviceName, - properties, + body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Creates and executes a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. + * @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 machine Learning service object wrapped into ARM resource envelope. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String serviceName, - CreateServiceRequest properties, - Context context) { + private Mono> createOrUpdateWithResponseAsync( + String id, String resourceGroupName, String workspaceName, JobBaseResourceInner body, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { return Mono .error( @@ -1009,219 +922,240 @@ private Mono>> createOrUpdateWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (serviceName == null) { - return Mono.error(new IllegalArgumentException("Parameter serviceName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { - properties.validate(); + body.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); return service .createOrUpdate( this.client.getEndpoint(), + id, + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), - serviceName, - properties, + body, accept, context); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Creates and executes a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. + * @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 machine Learning service object wrapped into ARM resource envelope. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ServiceResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, serviceName, properties); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServiceResourceInner.class, - ServiceResourceInner.class, - Context.NONE); + private Mono createOrUpdateAsync( + String id, String resourceGroupName, String workspaceName, JobBaseResourceInner body) { + return createOrUpdateWithResponseAsync(id, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Creates and executes a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. + * @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 machine Learning service object wrapped into ARM resource envelope. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ServiceResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String serviceName, - CreateServiceRequest properties, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, serviceName, properties, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ServiceResourceInner.class, ServiceResourceInner.class, context); + public JobBaseResourceInner createOrUpdate( + String id, String resourceGroupName, String workspaceName, JobBaseResourceInner body) { + return createOrUpdateAsync(id, resourceGroupName, workspaceName, body).block(); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Creates and executes a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. + * @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 machine Learning service object wrapped into ARM resource envelope. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ServiceResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties).getSyncPoller(); + public Response createOrUpdateWithResponse( + String id, String resourceGroupName, String workspaceName, JobBaseResourceInner body, Context context) { + return createOrUpdateWithResponseAsync(id, resourceGroupName, workspaceName, body, context).block(); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Cancels a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 service object wrapped into ARM resource envelope. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ServiceResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String serviceName, - CreateServiceRequest properties, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties, context) - .getSyncPoller(); + private Mono> cancelWithResponseAsync(String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .cancel( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Cancels a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 service object wrapped into ARM resource envelope. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> cancelWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .cancel( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Cancels a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 service object wrapped into ARM resource envelope. + * @return the completion. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String serviceName, - CreateServiceRequest properties, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono cancelAsync(String id, String resourceGroupName, String workspaceName) { + return cancelWithResponseAsync(id, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Cancels a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 service object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServiceResourceInner createOrUpdate( - String resourceGroupName, String workspaceName, String serviceName, CreateServiceRequest properties) { - return createOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties).block(); + public void cancel(String id, String resourceGroupName, String workspaceName) { + cancelAsync(id, resourceGroupName, workspaceName).block(); } /** - * Creates or updates service. This call will update a service if it exists. This is a nonrecoverable operation. If - * your intent is to create a new service, do a GET first to verify that it does not exist yet. + * Cancels a Job. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param id The name and identifier for the Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param properties The payload that is used to create or update the Service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 service object wrapped into ARM resource envelope. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServiceResourceInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String serviceName, - CreateServiceRequest properties, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties, context).block(); + public Response cancelWithResponse( + String id, String resourceGroupName, String workspaceName, Context context) { + return cancelWithResponseAsync(id, resourceGroupName, workspaceName, context).block(); } /** @@ -1231,10 +1165,10 @@ public ServiceResourceInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 service objects wrapped in ARM resource envelope. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1246,8 +1180,8 @@ private Mono> listByWorkspaceNextSinglePageA } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( res -> new PagedResponseBase<>( res.getRequest(), @@ -1267,11 +1201,10 @@ private Mono> listByWorkspaceNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 service objects wrapped in ARM resource envelope. + * @return a paginated list of JobBase entities. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1284,7 +1217,7 @@ private Mono> listByWorkspaceNextSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) + .listNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobsImpl.java similarity index 58% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesImpl.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobsImpl.java index 65e2594c6abd..7943847ce997 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/MachineLearningServicesImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/JobsImpl.java @@ -9,99 +9,93 @@ import com.azure.core.http.rest.SimpleResponse; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.MachineLearningServicesClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.MachineLearningServices; -import com.azure.resourcemanager.machinelearningservices.models.OrderString; -import com.azure.resourcemanager.machinelearningservices.models.ServiceResource; +import com.azure.resourcemanager.machinelearningservices.fluent.JobsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.JobBaseResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.JobBaseResource; +import com.azure.resourcemanager.machinelearningservices.models.Jobs; import com.fasterxml.jackson.annotation.JsonIgnore; -public final class MachineLearningServicesImpl implements MachineLearningServices { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MachineLearningServicesImpl.class); +public final class JobsImpl implements Jobs { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JobsImpl.class); - private final MachineLearningServicesClient innerClient; + private final JobsClient innerClient; private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - public MachineLearningServicesImpl( - MachineLearningServicesClient innerClient, + public JobsImpl( + JobsClient innerClient, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new JobBaseResourceImpl(inner1, this.manager())); } - public PagedIterable listByWorkspace( + public PagedIterable list( String resourceGroupName, String workspaceName, String skip, - String modelId, - String modelName, - String tag, + String jobType, String tags, - String properties, - String runId, - Boolean expand, - OrderString orderby, + String tag, Context context) { - PagedIterable inner = - this - .serviceClient() - .listByWorkspace( - resourceGroupName, - workspaceName, - skip, - modelId, - modelName, - tag, - tags, - properties, - runId, - expand, - orderby, - context); - return Utils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager())); - } - - public ServiceResource get(String resourceGroupName, String workspaceName, String serviceName) { - ServiceResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, serviceName); + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skip, jobType, tags, tag, context); + return Utils.mapPage(inner, inner1 -> new JobBaseResourceImpl(inner1, this.manager())); + } + + public void delete(String id, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(id, resourceGroupName, workspaceName); + } + + public void delete(String id, String resourceGroupName, String workspaceName, Context context) { + this.serviceClient().delete(id, resourceGroupName, workspaceName, context); + } + + public JobBaseResource get(String id, String resourceGroupName, String workspaceName) { + JobBaseResourceInner inner = this.serviceClient().get(id, resourceGroupName, workspaceName); if (inner != null) { - return new ServiceResourceImpl(inner, this.manager()); + return new JobBaseResourceImpl(inner, this.manager()); } else { return null; } } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String serviceName, Boolean expand, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, serviceName, expand, context); + public Response getWithResponse( + String id, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(id, resourceGroupName, workspaceName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServiceResourceImpl(inner.getValue(), this.manager())); + new JobBaseResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public void delete(String resourceGroupName, String workspaceName, String serviceName) { - this.serviceClient().delete(resourceGroupName, workspaceName, serviceName); + public void cancel(String id, String resourceGroupName, String workspaceName) { + this.serviceClient().cancel(id, resourceGroupName, workspaceName); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String serviceName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, serviceName, context); + public Response cancelWithResponse( + String id, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().cancelWithResponse(id, resourceGroupName, workspaceName, context); } - public ServiceResource getById(String id) { + public JobBaseResource getById(String id) { + String varId = Utils.getValueFromIdByName(id, "jobs"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + } String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger @@ -117,20 +111,17 @@ public ServiceResource getById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { + return this.getWithResponse(varId, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String varId = Utils.getValueFromIdByName(id, "jobs"); + if (varId == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } - Boolean localExpand = null; - return this - .getWithResponse(resourceGroupName, workspaceName, serviceName, localExpand, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Boolean expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger @@ -146,17 +137,17 @@ public Response getByIdWithResponse(String id, Boolean expand, new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { + return this.getWithResponse(varId, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String varId = Utils.getValueFromIdByName(id, "jobs"); + if (varId == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } - return this.getWithResponse(resourceGroupName, workspaceName, serviceName, expand, context); - } - - public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger @@ -172,17 +163,17 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { + this.delete(varId, resourceGroupName, workspaceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String varId = Utils.getValueFromIdByName(id, "jobs"); + if (varId == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } - this.deleteWithResponse(resourceGroupName, workspaceName, serviceName, Context.NONE).getValue(); - } - - public Response deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw logger @@ -198,17 +189,10 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String serviceName = Utils.getValueFromIdByName(id, "services"); - if (serviceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.deleteWithResponse(resourceGroupName, workspaceName, serviceName, context); + this.delete(varId, resourceGroupName, workspaceName, context); } - private MachineLearningServicesClient serviceClient() { + private JobsClient serviceClient() { return this.innerClient; } @@ -216,7 +200,7 @@ private com.azure.resourcemanager.machinelearningservices.MachineLearningService return this.serviceManager; } - public ServiceResourceImpl define(String name) { - return new ServiceResourceImpl(name, this.manager()); + public JobBaseResourceImpl define(String name) { + return new JobBaseResourceImpl(name, this.manager()); } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobResourceImpl.java new file mode 100644 index 000000000000..995b07f79dfd --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobResourceImpl.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.LabelingJobResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.ExportSummary; +import com.azure.resourcemanager.machinelearningservices.models.LabelingJob; +import com.azure.resourcemanager.machinelearningservices.models.LabelingJobResource; + +public final class LabelingJobResourceImpl + implements LabelingJobResource, LabelingJobResource.Definition, LabelingJobResource.Update { + private LabelingJobResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public LabelingJob properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public LabelingJobResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String id; + + private String resourceGroupName; + + private String workspaceName; + + public LabelingJobResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public LabelingJobResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .createOrUpdate(id, resourceGroupName, workspaceName, this.innerModel(), Context.NONE); + return this; + } + + public LabelingJobResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .createOrUpdate(id, resourceGroupName, workspaceName, this.innerModel(), context); + return this; + } + + LabelingJobResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new LabelingJobResourceInner(); + this.serviceManager = serviceManager; + this.id = name; + } + + public LabelingJobResourceImpl update() { + return this; + } + + public LabelingJobResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .createOrUpdate(id, resourceGroupName, workspaceName, this.innerModel(), Context.NONE); + return this; + } + + public LabelingJobResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .createOrUpdate(id, resourceGroupName, workspaceName, this.innerModel(), context); + return this; + } + + LabelingJobResourceImpl( + LabelingJobResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.id = Utils.getValueFromIdByName(innerObject.id(), "labelingJobs"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public LabelingJobResource refresh() { + Boolean localIncludeJobInstructions = null; + Boolean localIncludeLabelCategories = null; + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .getWithResponse( + id, + resourceGroupName, + workspaceName, + localIncludeJobInstructions, + localIncludeLabelCategories, + Context.NONE) + .getValue(); + return this; + } + + public LabelingJobResource refresh(Context context) { + Boolean localIncludeJobInstructions = null; + Boolean localIncludeLabelCategories = null; + this.innerObject = + serviceManager + .serviceClient() + .getLabelingJobs() + .getWithResponse( + id, + resourceGroupName, + workspaceName, + localIncludeJobInstructions, + localIncludeLabelCategories, + context) + .getValue(); + return this; + } + + public ExportSummary exportLabels(ExportSummaryInner body) { + return serviceManager.labelingJobs().exportLabels(id, resourceGroupName, workspaceName, body); + } + + public ExportSummary exportLabels(ExportSummaryInner body, Context context) { + return serviceManager.labelingJobs().exportLabels(id, resourceGroupName, workspaceName, body, context); + } + + public void pause() { + serviceManager.labelingJobs().pause(id, resourceGroupName, workspaceName); + } + + public Response pauseWithResponse(Context context) { + return serviceManager.labelingJobs().pauseWithResponse(id, resourceGroupName, workspaceName, context); + } + + public void resume() { + serviceManager.labelingJobs().resume(id, resourceGroupName, workspaceName); + } + + public void resume(Context context) { + serviceManager.labelingJobs().resume(id, resourceGroupName, workspaceName, context); + } + + public LabelingJobResourceImpl withProperties(LabelingJob properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobsClientImpl.java new file mode 100644 index 000000000000..5c761952deb8 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobsClientImpl.java @@ -0,0 +1,1835 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearningservices.fluent.LabelingJobsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.LabelingJobResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.LabelingJobResourceArmPaginatedResult; +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 LabelingJobsClient. */ +public final class LabelingJobsClientImpl implements LabelingJobsClient { + private final ClientLogger logger = new ClientLogger(LabelingJobsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final LabelingJobsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of LabelingJobsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LabelingJobsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = + RestProxy.create(LabelingJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesLabelingJobs to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface LabelingJobsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("count") Integer count, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("id") String id, + @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}/labelingJobs/{id}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("id") String id, + @QueryParam("api-version") String apiVersion, + @QueryParam("includeJobInstructions") Boolean includeJobInstructions, + @QueryParam("includeLabelCategories") Boolean includeLabelCategories, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("id") String id, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") LabelingJobResourceInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/exportLabels") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> exportLabels( + @HostParam("$host") String endpoint, + @PathParam("id") String id, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") ExportSummaryInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/pause") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> pause( + @HostParam("$host") String endpoint, + @PathParam("id") String id, + @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}/labelingJobs/{id}/resume") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resume( + @HostParam("$host") String endpoint, + @PathParam("id") String id, + @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("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Lists labeling 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 skip Continuation token for pagination. + * @param count Number of labeling jobs to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String skip, Integer count) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + skip, + count, + 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())); + } + + /** + * Lists labeling 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 skip Continuation token for pagination. + * @param count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String skip, Integer count, 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(), + skip, + count, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists labeling 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 skip Continuation token for pagination. + * @param count Number of labeling jobs to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skip, Integer count) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists labeling 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer count = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists labeling 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 skip Continuation token for pagination. + * @param count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists labeling 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer count = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count)); + } + + /** + * Lists labeling 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 skip Continuation token for pagination. + * @param count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, context)); + } + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String id, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(id, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String id, String resourceGroupName, String workspaceName) { + deleteAsync(id, resourceGroupName, workspaceName).block(); + } + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String id, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(id, resourceGroupName, workspaceName, context).block(); + } + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String id, + String resourceGroupName, + String workspaceName, + Boolean includeJobInstructions, + Boolean includeLabelCategories) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + includeJobInstructions, + includeLabelCategories, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String id, + String resourceGroupName, + String workspaceName, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + includeJobInstructions, + includeLabelCategories, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String id, + String resourceGroupName, + String workspaceName, + Boolean includeJobInstructions, + Boolean includeLabelCategories) { + return getWithResponseAsync( + id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @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 labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String id, String resourceGroupName, String workspaceName) { + final Boolean includeJobInstructions = null; + final Boolean includeLabelCategories = null; + return getWithResponseAsync( + id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @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 labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobResourceInner get(String id, String resourceGroupName, String workspaceName) { + final Boolean includeJobInstructions = null; + final Boolean includeLabelCategories = null; + return getAsync(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories).block(); + } + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String id, + String resourceGroupName, + String workspaceName, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context) { + return getWithResponseAsync( + id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories, context) + .block(); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, LabelingJobResourceInner> beginCreateOrUpdateAsync( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(id, resourceGroupName, workspaceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + LabelingJobResourceInner.class, + LabelingJobResourceInner.class, + Context.NONE); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, LabelingJobResourceInner> beginCreateOrUpdateAsync( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(id, resourceGroupName, workspaceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + LabelingJobResourceInner.class, + LabelingJobResourceInner.class, + context); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, LabelingJobResourceInner> beginCreateOrUpdate( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body) { + return beginCreateOrUpdateAsync(id, resourceGroupName, workspaceName, body).getSyncPoller(); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, LabelingJobResourceInner> beginCreateOrUpdate( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body, Context context) { + return beginCreateOrUpdateAsync(id, resourceGroupName, workspaceName, body, context).getSyncPoller(); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body) { + return beginCreateOrUpdateAsync(id, resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body, Context context) { + return beginCreateOrUpdateAsync(id, resourceGroupName, workspaceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobResourceInner createOrUpdate( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body) { + return createOrUpdateAsync(id, resourceGroupName, workspaceName, body).block(); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body LabelingJob 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobResourceInner createOrUpdate( + String id, String resourceGroupName, String workspaceName, LabelingJobResourceInner body, Context context) { + return createOrUpdateAsync(id, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + private Mono>> exportLabelsWithResponseAsync( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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 + .exportLabels( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + private Mono>> exportLabelsWithResponseAsync( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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 + .exportLabels( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + private PollerFlux, ExportSummaryInner> beginExportLabelsAsync( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body) { + Mono>> mono = + exportLabelsWithResponseAsync(id, resourceGroupName, workspaceName, body); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ExportSummaryInner.class, ExportSummaryInner.class, Context.NONE); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + private PollerFlux, ExportSummaryInner> beginExportLabelsAsync( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + exportLabelsWithResponseAsync(id, resourceGroupName, workspaceName, body, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ExportSummaryInner.class, ExportSummaryInner.class, context); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 SyncPoller, ExportSummaryInner> beginExportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body) { + return beginExportLabelsAsync(id, resourceGroupName, workspaceName, body).getSyncPoller(); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 SyncPoller, ExportSummaryInner> beginExportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context) { + return beginExportLabelsAsync(id, resourceGroupName, workspaceName, body, context).getSyncPoller(); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + private Mono exportLabelsAsync( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body) { + return beginExportLabelsAsync(id, resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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) + private Mono exportLabelsAsync( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context) { + return beginExportLabelsAsync(id, resourceGroupName, workspaceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ExportSummaryInner exportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body) { + return exportLabelsAsync(id, resourceGroupName, workspaceName, body).block(); + } + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 ExportSummaryInner exportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context) { + return exportLabelsAsync(id, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> pauseWithResponseAsync(String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .pause( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> pauseWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .pause( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono pauseAsync(String id, String resourceGroupName, String workspaceName) { + return pauseWithResponseAsync(id, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void pause(String id, String resourceGroupName, String workspaceName) { + pauseAsync(id, resourceGroupName, workspaceName).block(); + } + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response pauseWithResponse( + String id, String resourceGroupName, String workspaceName, Context context) { + return pauseWithResponseAsync(id, resourceGroupName, workspaceName, context).block(); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resumeWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .resume( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resumeWithResponseAsync( + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .resume( + this.client.getEndpoint(), + id, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginResumeAsync( + String id, String resourceGroupName, String workspaceName) { + Mono>> mono = resumeWithResponseAsync(id, resourceGroupName, workspaceName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginResumeAsync( + String id, String resourceGroupName, String workspaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = resumeWithResponseAsync(id, resourceGroupName, workspaceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginResume(String id, String resourceGroupName, String workspaceName) { + return beginResumeAsync(id, resourceGroupName, workspaceName).getSyncPoller(); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginResume( + String id, String resourceGroupName, String workspaceName, Context context) { + return beginResumeAsync(id, resourceGroupName, workspaceName, context).getSyncPoller(); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeAsync(String id, String resourceGroupName, String workspaceName) { + return beginResumeAsync(id, resourceGroupName, workspaceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeAsync(String id, String resourceGroupName, String workspaceName, Context context) { + return beginResumeAsync(id, resourceGroupName, workspaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resume(String id, String resourceGroupName, String workspaceName) { + resumeAsync(id, resourceGroupName, workspaceName).block(); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 resume(String id, String resourceGroupName, String workspaceName, Context context) { + resumeAsync(id, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of LabelingJob entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobsImpl.java new file mode 100644 index 000000000000..a6f82c52cbfe --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/LabelingJobsImpl.java @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.LabelingJobsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.LabelingJobResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.ExportSummary; +import com.azure.resourcemanager.machinelearningservices.models.LabelingJobResource; +import com.azure.resourcemanager.machinelearningservices.models.LabelingJobs; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class LabelingJobsImpl implements LabelingJobs { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobsImpl.class); + + private final LabelingJobsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public LabelingJobsImpl( + LabelingJobsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new LabelingJobResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skip, count, context); + return Utils.mapPage(inner, inner1 -> new LabelingJobResourceImpl(inner1, this.manager())); + } + + public void delete(String id, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(id, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String id, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(id, resourceGroupName, workspaceName, context); + } + + public LabelingJobResource get(String id, String resourceGroupName, String workspaceName) { + LabelingJobResourceInner inner = this.serviceClient().get(id, resourceGroupName, workspaceName); + if (inner != null) { + return new LabelingJobResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String id, + String resourceGroupName, + String workspaceName, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new LabelingJobResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ExportSummary exportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body) { + ExportSummaryInner inner = this.serviceClient().exportLabels(id, resourceGroupName, workspaceName, body); + if (inner != null) { + return new ExportSummaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExportSummary exportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context) { + ExportSummaryInner inner = + this.serviceClient().exportLabels(id, resourceGroupName, workspaceName, body, context); + if (inner != null) { + return new ExportSummaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public void pause(String id, String resourceGroupName, String workspaceName) { + this.serviceClient().pause(id, resourceGroupName, workspaceName); + } + + public Response pauseWithResponse( + String id, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().pauseWithResponse(id, resourceGroupName, workspaceName, context); + } + + public void resume(String id, String resourceGroupName, String workspaceName) { + this.serviceClient().resume(id, resourceGroupName, workspaceName); + } + + public void resume(String id, String resourceGroupName, String workspaceName, Context context) { + this.serviceClient().resume(id, resourceGroupName, workspaceName, context); + } + + public LabelingJobResource getById(String id) { + String varId = Utils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + Boolean localIncludeJobInstructions = null; + Boolean localIncludeLabelCategories = null; + return this + .getWithResponse( + varId, + resourceGroupName, + workspaceName, + localIncludeJobInstructions, + localIncludeLabelCategories, + Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse( + String id, Boolean includeJobInstructions, Boolean includeLabelCategories, Context context) { + String varId = Utils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this + .getWithResponse( + varId, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories, context); + } + + public void deleteById(String id) { + String varId = Utils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(varId, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String varId = Utils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(varId, resourceGroupName, workspaceName, context); + } + + private LabelingJobsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public LabelingJobResourceImpl define(String name) { + return new LabelingJobResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainerResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainerResourceImpl.java new file mode 100644 index 000000000000..21ea5793a1c4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainerResourceImpl.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.ModelContainer; +import com.azure.resourcemanager.machinelearningservices.models.ModelContainerResource; + +public final class ModelContainerResourceImpl + implements ModelContainerResource, ModelContainerResource.Definition, ModelContainerResource.Update { + private ModelContainerResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ModelContainer properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ModelContainerResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String resourceGroupName; + + private String workspaceName; + + public ModelContainerResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public ModelContainerResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getModelContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ModelContainerResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getModelContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + ModelContainerResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new ModelContainerResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public ModelContainerResourceImpl update() { + return this; + } + + public ModelContainerResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getModelContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ModelContainerResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getModelContainers() + .createOrUpdateWithResponse(name, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + ModelContainerResourceImpl( + ModelContainerResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public ModelContainerResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getModelContainers() + .getWithResponse(name, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public ModelContainerResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getModelContainers() + .getWithResponse(name, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public ModelContainerResourceImpl withProperties(ModelContainer properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainersClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainersClientImpl.java new file mode 100644 index 000000000000..d68b2aed9202 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainersClientImpl.java @@ -0,0 +1,932 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.ModelContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.ModelContainerResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ModelContainersClient. */ +public final class ModelContainersClientImpl implements ModelContainersClient { + private final ClientLogger logger = new ClientLogger(ModelContainersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ModelContainersService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ModelContainersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ModelContainersClientImpl(AzureMachineLearningWorkspacesImpl 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. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface ModelContainersService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, + @QueryParam("count") Integer count, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @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}/models/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") ModelContainerResourceInner body, + @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); + } + + /** + * 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 skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String skip, Integer count) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + skip, + count, + 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 model 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 count Maximum number of results to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String skip, Integer count, 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(), + skip, + count, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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 workspaceName Name of Azure Machine Learning workspace. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skip, Integer count) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List model 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 ModelContainer entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer count = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * 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 skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List model 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 ModelContainer entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer count = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count)); + } + + /** + * 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 skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, context)); + } + + /** + * Delete container. + * + * @param name Container 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete container. + * + * @param name Container name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete container. + * + * @param name Container 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete container. + * + * @param name Container 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String resourceGroupName, String workspaceName) { + deleteAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String name, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get container. + * + * @param name Container 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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerResourceInner get(String name, String resourceGroupName, String workspaceName) { + return getAsync(name, resourceGroupName, workspaceName).block(); + } + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, resourceGroupName, workspaceName, context).block(); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String name, String resourceGroupName, String workspaceName, ModelContainerResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, + String resourceGroupName, + String workspaceName, + ModelContainerResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String name, String resourceGroupName, String workspaceName, ModelContainerResourceInner body) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerResourceInner createOrUpdate( + String name, String resourceGroupName, String workspaceName, ModelContainerResourceInner body) { + return createOrUpdateAsync(name, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update container. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 Response createOrUpdateWithResponse( + String name, + String resourceGroupName, + String workspaceName, + ModelContainerResourceInner body, + Context context) { + return createOrUpdateWithResponseAsync(name, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of ModelContainer entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of ModelContainer entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainersImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainersImpl.java new file mode 100644 index 000000000000..32828e641da5 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelContainersImpl.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.ModelContainersClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelContainerResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.ModelContainerResource; +import com.azure.resourcemanager.machinelearningservices.models.ModelContainers; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ModelContainersImpl implements ModelContainers { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelContainersImpl.class); + + private final ModelContainersClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public ModelContainersImpl( + ModelContainersClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new ModelContainerResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName, skip, count, context); + return Utils.mapPage(inner, inner1 -> new ModelContainerResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + public ModelContainerResource get(String name, String resourceGroupName, String workspaceName) { + ModelContainerResourceInner inner = this.serviceClient().get(name, resourceGroupName, workspaceName); + if (inner != null) { + return new ModelContainerResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelContainerResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ModelContainerResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "models"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "models"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "models"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "models"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, resourceGroupName, workspaceName, context); + } + + private ModelContainersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public ModelContainerResourceImpl define(String name) { + return new ModelContainerResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionResourceImpl.java new file mode 100644 index 000000000000..5dd5f637a058 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionResourceImpl.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.ModelVersion; +import com.azure.resourcemanager.machinelearningservices.models.ModelVersionResource; + +public final class ModelVersionResourceImpl + implements ModelVersionResource, ModelVersionResource.Definition, ModelVersionResource.Update { + private ModelVersionResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ModelVersion properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ModelVersionResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String name; + + private String version; + + private String resourceGroupName; + + private String workspaceName; + + public ModelVersionResourceImpl withExistingModel(String name, String resourceGroupName, String workspaceName) { + this.name = name; + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public ModelVersionResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getModelVersions() + .createOrUpdateWithResponse( + name, version, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ModelVersionResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getModelVersions() + .createOrUpdateWithResponse(name, version, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + ModelVersionResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new ModelVersionResourceInner(); + this.serviceManager = serviceManager; + this.version = name; + } + + public ModelVersionResourceImpl update() { + return this; + } + + public ModelVersionResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getModelVersions() + .createOrUpdateWithResponse( + name, version, resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ModelVersionResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getModelVersions() + .createOrUpdateWithResponse(name, version, resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); + return this; + } + + ModelVersionResourceImpl( + ModelVersionResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); + this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public ModelVersionResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getModelVersions() + .getWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public ModelVersionResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getModelVersions() + .getWithResponse(name, version, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public ModelVersionResourceImpl withProperties(ModelVersion properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionsClientImpl.java new file mode 100644 index 000000000000..e1853e797f2a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionsClientImpl.java @@ -0,0 +1,1170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.ModelVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.ModelVersionResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ModelVersionsClient. */ +public final class ModelVersionsClientImpl implements ModelVersionsClient { + private final ClientLogger logger = new ClientLogger(ModelVersionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ModelVersionsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ModelVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ModelVersionsClientImpl(AzureMachineLearningWorkspacesImpl 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 + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface ModelVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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, + @PathParam("name") String name, + @PathParam("version") String version, + @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}/models/{name}/versions/{version}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("version") String version, + @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"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") ModelVersionResourceInner body, + @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); + } + + /** + * List model versions. + * + * @param name Model name. + * @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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String name, + String resourceGroupName, + String workspaceName, + String skip, + String orderBy, + Integer top, + String version, + String description, + Integer offset, + String tags, + String properties) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + name, + this.client.getApiVersion(), + skip, + orderBy, + top, + version, + description, + offset, + tags, + properties, + 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 model versions. + * + * @param name Model name. + * @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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String name, + String resourceGroupName, + String workspaceName, + String skip, + String orderBy, + Integer top, + String version, + String description, + Integer offset, + String tags, + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + name, + this.client.getApiVersion(), + skip, + orderBy, + top, + version, + description, + offset, + tags, + properties, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List model versions. + * + * @param name Model name. + * @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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, + String resourceGroupName, + String workspaceName, + String skip, + String orderBy, + Integer top, + String version, + String description, + Integer offset, + String tags, + String properties) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + name, + resourceGroupName, + workspaceName, + skip, + orderBy, + top, + version, + description, + offset, + tags, + properties), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List model versions. + * + * @param name Model 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 ModelVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, String resourceGroupName, String workspaceName) { + 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; + return new PagedFlux<>( + () -> + listSinglePageAsync( + name, + resourceGroupName, + workspaceName, + skip, + orderBy, + top, + version, + description, + offset, + tags, + properties), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List model versions. + * + * @param name Model name. + * @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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String name, + String resourceGroupName, + String workspaceName, + String skip, + String orderBy, + Integer top, + String version, + String description, + Integer offset, + String tags, + String properties, + Context context) { + return new PagedFlux<>( + () -> + listSinglePageAsync( + name, + resourceGroupName, + workspaceName, + skip, + orderBy, + top, + version, + description, + offset, + tags, + properties, + context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List model versions. + * + * @param name Model 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 ModelVersion entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String name, String resourceGroupName, String workspaceName) { + 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; + return new PagedIterable<>( + listAsync( + name, + resourceGroupName, + workspaceName, + skip, + orderBy, + top, + version, + description, + offset, + tags, + properties)); + } + + /** + * List model versions. + * + * @param name Model name. + * @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 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String skip, + String orderBy, + Integer top, + String version, + String description, + Integer offset, + String tags, + String properties, + Context context) { + return new PagedIterable<>( + listAsync( + name, + resourceGroupName, + workspaceName, + skip, + orderBy, + top, + version, + description, + offset, + tags, + properties, + context)); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String name, String version, String resourceGroupName, String workspaceName) { + return deleteWithResponseAsync(name, version, resourceGroupName, workspaceName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String name, String version, String resourceGroupName, String workspaceName) { + deleteAsync(name, version, resourceGroupName, workspaceName).block(); + } + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return deleteWithResponseAsync(name, version, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String name, String version, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String name, String version, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(name, version, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionResourceInner get(String name, String version, String resourceGroupName, String workspaceName) { + return getAsync(name, version, resourceGroupName, workspaceName).block(); + } + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(name, version, resourceGroupName, workspaceName, context).block(); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, String version, String resourceGroupName, String workspaceName, ModelVersionResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono> createOrUpdateWithResponseAsync( + String name, + String version, + String resourceGroupName, + String workspaceName, + ModelVersionResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + name, + version, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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) + private Mono createOrUpdateAsync( + String name, String version, String resourceGroupName, String workspaceName, ModelVersionResourceInner body) { + return createOrUpdateWithResponseAsync(name, version, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 ModelVersionResourceInner createOrUpdate( + String name, String version, String resourceGroupName, String workspaceName, ModelVersionResourceInner body) { + return createOrUpdateAsync(name, version, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update version. + * + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 Response createOrUpdateWithResponse( + String name, + String version, + String resourceGroupName, + String workspaceName, + ModelVersionResourceInner body, + Context context) { + return createOrUpdateWithResponseAsync(name, version, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of ModelVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of ModelVersion entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionsImpl.java new file mode 100644 index 000000000000..53cc6d182799 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ModelVersionsImpl.java @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.ModelVersionsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelVersionResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.ModelVersionResource; +import com.azure.resourcemanager.machinelearningservices.models.ModelVersions; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ModelVersionsImpl implements ModelVersions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelVersionsImpl.class); + + private final ModelVersionsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public ModelVersionsImpl( + ModelVersionsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String name, String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(name, resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new ModelVersionResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String skip, + String orderBy, + Integer top, + String version, + String description, + Integer offset, + String tags, + String properties, + Context context) { + PagedIterable inner = + this + .serviceClient() + .list( + name, + resourceGroupName, + workspaceName, + skip, + orderBy, + top, + version, + description, + offset, + tags, + properties, + context); + return Utils.mapPage(inner, inner1 -> new ModelVersionResourceImpl(inner1, this.manager())); + } + + public void delete(String name, String version, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(name, version, resourceGroupName, workspaceName); + } + + public Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + return this.serviceClient().deleteWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + public ModelVersionResource get(String name, String version, String resourceGroupName, String workspaceName) { + ModelVersionResourceInner inner = this.serviceClient().get(name, version, resourceGroupName, workspaceName); + if (inner != null) { + return new ModelVersionResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(name, version, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ModelVersionResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ModelVersionResource getById(String id) { + String name = Utils.getValueFromIdByName(id, "models"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "models"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String name = Utils.getValueFromIdByName(id, "models"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.deleteWithResponse(name, version, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String name = Utils.getValueFromIdByName(id, "models"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'models'.", id))); + } + String version = Utils.getValueFromIdByName(id, "versions"); + if (version == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.deleteWithResponse(name, version, resourceGroupName, workspaceName, context); + } + + private ModelVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public ModelVersionResourceImpl define(String name) { + return new ModelVersionResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksClientImpl.java deleted file mode 100644 index 5e755e400706..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksClientImpl.java +++ /dev/null @@ -1,455 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearningservices.fluent.NotebooksClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; -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 NotebooksClient. */ -public final class NotebooksClientImpl implements NotebooksClient { - private final ClientLogger logger = new ClientLogger(NotebooksClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final NotebooksService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of NotebooksClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NotebooksClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(NotebooksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesNotebooks to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface NotebooksService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> prepare( - @HostParam("$host") 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> listKeys( - @HostParam("$host") 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); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - private Mono>> prepareWithResponseAsync(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 - .prepare( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareWithResponseAsync( - 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 - .prepare( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - private PollerFlux, NotebookResourceInfoInner> beginPrepareAsync( - String resourceGroupName, String workspaceName) { - Mono>> mono = prepareWithResponseAsync(resourceGroupName, workspaceName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NotebookResourceInfoInner.class, - NotebookResourceInfoInner.class, - Context.NONE); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, NotebookResourceInfoInner> beginPrepareAsync( - String resourceGroupName, String workspaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = prepareWithResponseAsync(resourceGroupName, workspaceName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NotebookResourceInfoInner.class, - NotebookResourceInfoInner.class, - context); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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 SyncPoller, NotebookResourceInfoInner> beginPrepare( - String resourceGroupName, String workspaceName) { - return beginPrepareAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, NotebookResourceInfoInner> beginPrepare( - String resourceGroupName, String workspaceName, Context context) { - return beginPrepareAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - private Mono prepareAsync(String resourceGroupName, String workspaceName) { - return beginPrepareAsync(resourceGroupName, workspaceName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareAsync( - String resourceGroupName, String workspaceName, Context context) { - return beginPrepareAsync(resourceGroupName, workspaceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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 NotebookResourceInfoInner prepare(String resourceGroupName, String workspaceName) { - return prepareAsync(resourceGroupName, workspaceName).block(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookResourceInfoInner prepare(String resourceGroupName, String workspaceName, Context context) { - return prepareAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - 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(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @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); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - private Mono listKeysAsync(String resourceGroupName, String workspaceName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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 ListNotebookKeysResultInner listKeys(String resourceGroupName, String workspaceName) { - return listKeysAsync(resourceGroupName, workspaceName).block(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksImpl.java deleted file mode 100644 index bef3628c3b9b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/NotebooksImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.NotebooksClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearningservices.models.ListNotebookKeysResult; -import com.azure.resourcemanager.machinelearningservices.models.NotebookResourceInfo; -import com.azure.resourcemanager.machinelearningservices.models.Notebooks; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class NotebooksImpl implements Notebooks { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NotebooksImpl.class); - - private final NotebooksClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public NotebooksImpl( - NotebooksClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public NotebookResourceInfo prepare(String resourceGroupName, String workspaceName) { - NotebookResourceInfoInner inner = this.serviceClient().prepare(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public NotebookResourceInfo prepare(String resourceGroupName, String workspaceName, Context context) { - NotebookResourceInfoInner inner = this.serviceClient().prepare(resourceGroupName, workspaceName, context); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public ListNotebookKeysResult listKeys(String resourceGroupName, String workspaceName) { - ListNotebookKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ListNotebookKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private NotebooksClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentTrackedResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentTrackedResourceImpl.java new file mode 100644 index 000000000000..679be05263ed --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentTrackedResourceImpl.java @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DeploymentLogs; +import com.azure.resourcemanager.machinelearningservices.models.DeploymentLogsRequest; +import com.azure.resourcemanager.machinelearningservices.models.OnlineDeployment; +import com.azure.resourcemanager.machinelearningservices.models.OnlineDeploymentTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.PartialOnlineDeployment; +import com.azure.resourcemanager.machinelearningservices.models.PartialOnlineDeploymentPartialTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.ResourceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class OnlineDeploymentTrackedResourceImpl + implements OnlineDeploymentTrackedResource, + OnlineDeploymentTrackedResource.Definition, + OnlineDeploymentTrackedResource.Update { + private OnlineDeploymentTrackedResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 ResourceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public OnlineDeployment properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public OnlineDeploymentTrackedResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String endpointName; + + private String deploymentName; + + private String resourceGroupName; + + private String workspaceName; + + private PartialOnlineDeploymentPartialTrackedResource updateBody; + + public OnlineDeploymentTrackedResourceImpl withExistingOnlineEndpoint( + String endpointName, String resourceGroupName, String workspaceName) { + this.endpointName = endpointName; + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public OnlineDeploymentTrackedResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineDeployments() + .createOrUpdate( + endpointName, deploymentName, resourceGroupName, workspaceName, this.innerModel(), Context.NONE); + return this; + } + + public OnlineDeploymentTrackedResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineDeployments() + .createOrUpdate( + endpointName, deploymentName, resourceGroupName, workspaceName, this.innerModel(), context); + return this; + } + + OnlineDeploymentTrackedResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new OnlineDeploymentTrackedResourceInner(); + this.serviceManager = serviceManager; + this.deploymentName = name; + } + + public OnlineDeploymentTrackedResourceImpl update() { + this.updateBody = new PartialOnlineDeploymentPartialTrackedResource(); + return this; + } + + public OnlineDeploymentTrackedResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineDeployments() + .update(endpointName, deploymentName, resourceGroupName, workspaceName, updateBody, Context.NONE); + return this; + } + + public OnlineDeploymentTrackedResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineDeployments() + .update(endpointName, deploymentName, resourceGroupName, workspaceName, updateBody, context); + return this; + } + + OnlineDeploymentTrackedResourceImpl( + OnlineDeploymentTrackedResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); + this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "deployments"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public OnlineDeploymentTrackedResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineDeployments() + .getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public OnlineDeploymentTrackedResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineDeployments() + .getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public DeploymentLogs getLogs(DeploymentLogsRequest body) { + return serviceManager + .onlineDeployments() + .getLogs(endpointName, deploymentName, resourceGroupName, workspaceName, body); + } + + public Response getLogsWithResponse(DeploymentLogsRequest body, Context context) { + return serviceManager + .onlineDeployments() + .getLogsWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, body, context); + } + + public OnlineDeploymentTrackedResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public OnlineDeploymentTrackedResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public OnlineDeploymentTrackedResourceImpl withProperties(OnlineDeployment properties) { + this.innerModel().withProperties(properties); + return this; + } + + public OnlineDeploymentTrackedResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public OnlineDeploymentTrackedResourceImpl withIdentity(ResourceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public OnlineDeploymentTrackedResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateBody.withKind(kind); + return this; + } + } + + public OnlineDeploymentTrackedResourceImpl withProperties(PartialOnlineDeployment properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentsClientImpl.java new file mode 100644 index 000000000000..ca8d73c7544c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentsClientImpl.java @@ -0,0 +1,1915 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearningservices.fluent.OnlineDeploymentsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DeploymentLogsInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DeploymentLogsRequest; +import com.azure.resourcemanager.machinelearningservices.models.OnlineDeploymentTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearningservices.models.PartialOnlineDeploymentPartialTrackedResource; +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 OnlineDeploymentsClient. */ +public final class OnlineDeploymentsClientImpl implements OnlineDeploymentsClient { + private final ClientLogger logger = new ClientLogger(OnlineDeploymentsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OnlineDeploymentsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of OnlineDeploymentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OnlineDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl 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 + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface OnlineDeploymentsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" + + "/deployments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @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}/onlineEndpoints/{endpointName}" + + "/deployments/{deploymentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @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"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" + + "/deployments/{deploymentName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") PartialOnlineDeploymentPartialTrackedResource body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" + + "/deployments/{deploymentName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") OnlineDeploymentTrackedResourceInner body, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" + + "/deployments/{deploymentName}/getLogs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getLogs( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") DeploymentLogsRequest body, + @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); + } + + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String endpointName, String resourceGroupName, String workspaceName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + endpointName, + this.client.getApiVersion(), + orderBy, + top, + skip, + 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 Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + endpointName, + this.client.getApiVersion(), + orderBy, + top, + skip, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String endpointName, String resourceGroupName, String workspaceName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint 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 OnlineDeployment entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String endpointName, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint 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 OnlineDeployment entities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String endpointName, String resourceGroupName, String workspaceName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(listAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip)); + } + + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + return new PagedIterable<>( + listAsync(endpointName, resourceGroupName, workspaceName, orderBy, top, skip, context)); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String endpointName, String deploymentName, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String endpointName, String deploymentName, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + Mono>> mono = + deleteWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + return beginDeleteAsync(endpointName, deploymentName, resourceGroupName, workspaceName).getSyncPoller(); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + return beginDeleteAsync(endpointName, deploymentName, resourceGroupName, workspaceName, context) + .getSyncPoller(); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + return beginDeleteAsync(endpointName, deploymentName, resourceGroupName, workspaceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + return beginDeleteAsync(endpointName, deploymentName, resourceGroupName, workspaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + deleteAsync(endpointName, deploymentName, resourceGroupName, workspaceName).block(); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 delete( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + deleteAsync(endpointName, deploymentName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 inference Deployment Deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String endpointName, String deploymentName, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 inference Deployment Deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String endpointName, String deploymentName, 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 inference Deployment Deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 inference Deployment Deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineDeploymentTrackedResourceInner get( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + return getAsync(endpointName, deploymentName, resourceGroupName, workspaceName).block(); + } + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 inference Deployment Deployment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, OnlineDeploymentTrackedResourceInner> + beginUpdateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body) { + Mono>> mono = + updateWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OnlineDeploymentTrackedResourceInner.class, + OnlineDeploymentTrackedResourceInner.class, + Context.NONE); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, OnlineDeploymentTrackedResourceInner> + beginUpdateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OnlineDeploymentTrackedResourceInner.class, + OnlineDeploymentTrackedResourceInner.class, + context); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OnlineDeploymentTrackedResourceInner> + beginUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body) { + return beginUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body).getSyncPoller(); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OnlineDeploymentTrackedResourceInner> + beginUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body, + Context context) { + return beginUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context) + .getSyncPoller(); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body) { + return beginUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body, + Context context) { + return beginUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineDeploymentTrackedResourceInner update( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body) { + return updateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Update Online Deployment (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineDeploymentTrackedResourceInner update( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + PartialOnlineDeploymentPartialTrackedResource body, + Context context) { + return updateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, OnlineDeploymentTrackedResourceInner> + beginCreateOrUpdateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OnlineDeploymentTrackedResourceInner.class, + OnlineDeploymentTrackedResourceInner.class, + Context.NONE); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, OnlineDeploymentTrackedResourceInner> + beginCreateOrUpdateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + endpointName, deploymentName, resourceGroupName, workspaceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OnlineDeploymentTrackedResourceInner.class, + OnlineDeploymentTrackedResourceInner.class, + context); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OnlineDeploymentTrackedResourceInner> + beginCreateOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body) { + return beginCreateOrUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body) + .getSyncPoller(); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OnlineDeploymentTrackedResourceInner> + beginCreateOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body, + Context context) { + return beginCreateOrUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context) + .getSyncPoller(); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body) { + return beginCreateOrUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body, + Context context) { + return beginCreateOrUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineDeploymentTrackedResourceInner createOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body) { + return createOrUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineDeploymentTrackedResourceInner createOrUpdate( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + OnlineDeploymentTrackedResourceInner body, + Context context) { + return createOrUpdateAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context) + .block(); + } + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getLogsWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getLogsWithResponseAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + 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 (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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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 + .getLogs( + this.client.getEndpoint(), + endpointName, + deploymentName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getLogsAsync( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body) { + return getLogsWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentLogsInner getLogs( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body) { + return getLogsAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLogsWithResponse( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body, + Context context) { + return getLogsWithResponseAsync(endpointName, deploymentName, resourceGroupName, workspaceName, body, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of OnlineDeployment entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of OnlineDeployment entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentsImpl.java new file mode 100644 index 000000000000..9bc4db96b662 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineDeploymentsImpl.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.OnlineDeploymentsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DeploymentLogsInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.DeploymentLogs; +import com.azure.resourcemanager.machinelearningservices.models.DeploymentLogsRequest; +import com.azure.resourcemanager.machinelearningservices.models.OnlineDeploymentTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.OnlineDeployments; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OnlineDeploymentsImpl implements OnlineDeployments { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineDeploymentsImpl.class); + + private final OnlineDeploymentsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public OnlineDeploymentsImpl( + OnlineDeploymentsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String endpointName, String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(endpointName, resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new OnlineDeploymentTrackedResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context) { + PagedIterable inner = + this.serviceClient().list(endpointName, resourceGroupName, workspaceName, orderBy, top, skip, context); + return Utils.mapPage(inner, inner1 -> new OnlineDeploymentTrackedResourceImpl(inner1, this.manager())); + } + + public void delete(String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(endpointName, deploymentName, resourceGroupName, workspaceName); + } + + public void delete( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + this.serviceClient().delete(endpointName, deploymentName, resourceGroupName, workspaceName, context); + } + + public OnlineDeploymentTrackedResource get( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName) { + OnlineDeploymentTrackedResourceInner inner = + this.serviceClient().get(endpointName, deploymentName, resourceGroupName, workspaceName); + if (inner != null) { + return new OnlineDeploymentTrackedResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OnlineDeploymentTrackedResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeploymentLogs getLogs( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body) { + DeploymentLogsInner inner = + this.serviceClient().getLogs(endpointName, deploymentName, resourceGroupName, workspaceName, body); + if (inner != null) { + return new DeploymentLogsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getLogsWithResponse( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body, + Context context) { + Response inner = + this + .serviceClient() + .getLogsWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, body, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeploymentLogsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OnlineDeploymentTrackedResource getById(String id) { + String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + } + String deploymentName = Utils.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))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this + .getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + } + String deploymentName = Utils.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))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(endpointName, deploymentName, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + } + String deploymentName = Utils.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))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.delete(endpointName, deploymentName, resourceGroupName, workspaceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + } + String deploymentName = Utils.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))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.delete(endpointName, deploymentName, resourceGroupName, workspaceName, context); + } + + private OnlineDeploymentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public OnlineDeploymentTrackedResourceImpl define(String name) { + return new OnlineDeploymentTrackedResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointImpl.java new file mode 100644 index 000000000000..2d4161c97b5d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointImpl.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.implementation; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointInner; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthKeys; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthMode; +import com.azure.resourcemanager.machinelearningservices.models.EndpointProvisioningState; +import com.azure.resourcemanager.machinelearningservices.models.OnlineEndpoint; +import java.util.Collections; +import java.util.Map; + +public final class OnlineEndpointImpl implements OnlineEndpoint { + private OnlineEndpointInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + OnlineEndpointImpl( + OnlineEndpointInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + 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) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public EndpointProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String scoringUri() { + return this.innerModel().scoringUri(); + } + + public String swaggerUri() { + return this.innerModel().swaggerUri(); + } + + public String target() { + return this.innerModel().target(); + } + + public Map traffic() { + Map inner = this.innerModel().traffic(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public OnlineEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointTrackedResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointTrackedResourceImpl.java new file mode 100644 index 000000000000..84cf5a39a6ba --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointTrackedResourceImpl.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.OnlineEndpointInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthKeys; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthToken; +import com.azure.resourcemanager.machinelearningservices.models.OnlineEndpoint; +import com.azure.resourcemanager.machinelearningservices.models.OnlineEndpointTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.PartialOnlineEndpoint; +import com.azure.resourcemanager.machinelearningservices.models.PartialOnlineEndpointPartialTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.RegenerateEndpointKeysRequest; +import com.azure.resourcemanager.machinelearningservices.models.ResourceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class OnlineEndpointTrackedResourceImpl + implements OnlineEndpointTrackedResource, + OnlineEndpointTrackedResource.Definition, + OnlineEndpointTrackedResource.Update { + private OnlineEndpointTrackedResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 ResourceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public OnlineEndpoint properties() { + OnlineEndpointInner inner = this.innerModel().properties(); + if (inner != null) { + return new OnlineEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public OnlineEndpointTrackedResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + private String endpointName; + + private String resourceGroupName; + + private String workspaceName; + + private PartialOnlineEndpointPartialTrackedResource updateBody; + + public OnlineEndpointTrackedResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public OnlineEndpointTrackedResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineEndpoints() + .createOrUpdate(endpointName, resourceGroupName, workspaceName, this.innerModel(), Context.NONE); + return this; + } + + public OnlineEndpointTrackedResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineEndpoints() + .createOrUpdate(endpointName, resourceGroupName, workspaceName, this.innerModel(), context); + return this; + } + + OnlineEndpointTrackedResourceImpl( + String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = new OnlineEndpointTrackedResourceInner(); + this.serviceManager = serviceManager; + this.endpointName = name; + } + + public OnlineEndpointTrackedResourceImpl update() { + this.updateBody = new PartialOnlineEndpointPartialTrackedResource(); + return this; + } + + public OnlineEndpointTrackedResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineEndpoints() + .update(endpointName, resourceGroupName, workspaceName, updateBody, Context.NONE); + return this; + } + + public OnlineEndpointTrackedResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineEndpoints() + .update(endpointName, resourceGroupName, workspaceName, updateBody, context); + return this; + } + + OnlineEndpointTrackedResourceImpl( + OnlineEndpointTrackedResourceInner innerObject, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + } + + public OnlineEndpointTrackedResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineEndpoints() + .getWithResponse(endpointName, resourceGroupName, workspaceName, Context.NONE) + .getValue(); + return this; + } + + public OnlineEndpointTrackedResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getOnlineEndpoints() + .getWithResponse(endpointName, resourceGroupName, workspaceName, context) + .getValue(); + return this; + } + + public EndpointAuthKeys listKeys() { + return serviceManager.onlineEndpoints().listKeys(endpointName, resourceGroupName, workspaceName); + } + + public Response listKeysWithResponse(Context context) { + return serviceManager + .onlineEndpoints() + .listKeysWithResponse(endpointName, resourceGroupName, workspaceName, context); + } + + public void regenerateKeys(RegenerateEndpointKeysRequest body) { + serviceManager.onlineEndpoints().regenerateKeys(endpointName, resourceGroupName, workspaceName, body); + } + + public void regenerateKeys(RegenerateEndpointKeysRequest body, Context context) { + serviceManager.onlineEndpoints().regenerateKeys(endpointName, resourceGroupName, workspaceName, body, context); + } + + public EndpointAuthToken getToken() { + return serviceManager.onlineEndpoints().getToken(endpointName, resourceGroupName, workspaceName); + } + + public Response getTokenWithResponse(Context context) { + return serviceManager + .onlineEndpoints() + .getTokenWithResponse(endpointName, resourceGroupName, workspaceName, context); + } + + public OnlineEndpointTrackedResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public OnlineEndpointTrackedResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public OnlineEndpointTrackedResourceImpl withProperties(OnlineEndpointInner properties) { + this.innerModel().withProperties(properties); + return this; + } + + public OnlineEndpointTrackedResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public OnlineEndpointTrackedResourceImpl withIdentity(ResourceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public OnlineEndpointTrackedResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateBody.withKind(kind); + return this; + } + } + + public OnlineEndpointTrackedResourceImpl withProperties(PartialOnlineEndpoint properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointsClientImpl.java new file mode 100644 index 000000000000..b47715695cd3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointsClientImpl.java @@ -0,0 +1,2313 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearningservices.fluent.OnlineEndpointsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthTokenInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EndpointComputeType; +import com.azure.resourcemanager.machinelearningservices.models.OnlineEndpointTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearningservices.models.OrderString; +import com.azure.resourcemanager.machinelearningservices.models.PartialOnlineEndpointPartialTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.RegenerateEndpointKeysRequest; +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 OnlineEndpointsClient. */ +public final class OnlineEndpointsClientImpl implements OnlineEndpointsClient { + private final ClientLogger logger = new ClientLogger(OnlineEndpointsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OnlineEndpointsService service; + + /** The service client containing this operation class. */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of OnlineEndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OnlineEndpointsClientImpl(AzureMachineLearningWorkspacesImpl 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. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + private interface OnlineEndpointsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"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("endpointName") String endpointName, + @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}/onlineEndpoints/{endpointName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @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"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") PartialOnlineEndpointPartialTrackedResource body, + @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}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") OnlineEndpointTrackedResourceInner body, + @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("endpointName") String endpointName, + @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}/onlineEndpoints/{endpointName}" + + "/regenerateKeys") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> regenerateKeys( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") RegenerateEndpointKeysRequest body, + @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) + Mono> getToken( + @HostParam("$host") String endpoint, + @PathParam("endpointName") String endpointName, + @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("$host") 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. + */ + @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.getApiVersion(), + name, + count, + computeType, + skip, + tags, + properties, + orderBy, + 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 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. + */ + @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.getApiVersion(), + name, + count, + computeType, + skip, + tags, + properties, + orderBy, + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + 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. + */ + @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. + */ + @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. + */ + @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. + */ + @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. + */ + @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)); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .delete( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String endpointName, String resourceGroupName, String workspaceName) { + Mono>> mono = deleteWithResponseAsync(endpointName, resourceGroupName, workspaceName); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(endpointName, resourceGroupName, workspaceName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String endpointName, String resourceGroupName, String workspaceName) { + return beginDeleteAsync(endpointName, resourceGroupName, workspaceName).getSyncPoller(); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return beginDeleteAsync(endpointName, resourceGroupName, workspaceName, context).getSyncPoller(); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String endpointName, String resourceGroupName, String workspaceName) { + return beginDeleteAsync(endpointName, resourceGroupName, workspaceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return beginDeleteAsync(endpointName, resourceGroupName, workspaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String endpointName, String resourceGroupName, String workspaceName) { + deleteAsync(endpointName, resourceGroupName, workspaceName).block(); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @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 delete(String endpointName, String resourceGroupName, String workspaceName, Context context) { + deleteAsync(endpointName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint 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 online Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint name. + * @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 online Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .get( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint 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 online Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String endpointName, String resourceGroupName, String workspaceName) { + return getWithResponseAsync(endpointName, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint 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 online Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineEndpointTrackedResourceInner get(String endpointName, String resourceGroupName, String workspaceName) { + return getAsync(endpointName, resourceGroupName, workspaceName).block(); + } + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint name. + * @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 online Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(endpointName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, OnlineEndpointTrackedResourceInner> + beginUpdateAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body) { + Mono>> mono = + updateWithResponseAsync(endpointName, resourceGroupName, workspaceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OnlineEndpointTrackedResourceInner.class, + OnlineEndpointTrackedResourceInner.class, + Context.NONE); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, OnlineEndpointTrackedResourceInner> + beginUpdateAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(endpointName, resourceGroupName, workspaceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OnlineEndpointTrackedResourceInner.class, + OnlineEndpointTrackedResourceInner.class, + context); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OnlineEndpointTrackedResourceInner> beginUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body) { + return beginUpdateAsync(endpointName, resourceGroupName, workspaceName, body).getSyncPoller(); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OnlineEndpointTrackedResourceInner> beginUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body, + Context context) { + return beginUpdateAsync(endpointName, resourceGroupName, workspaceName, body, context).getSyncPoller(); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body) { + return beginUpdateAsync(endpointName, resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body, + Context context) { + return beginUpdateAsync(endpointName, resourceGroupName, workspaceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineEndpointTrackedResourceInner update( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body) { + return updateAsync(endpointName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineEndpointTrackedResourceInner update( + String endpointName, + String resourceGroupName, + String workspaceName, + PartialOnlineEndpointPartialTrackedResource body, + Context context) { + return updateAsync(endpointName, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String endpointName, String resourceGroupName, String workspaceName, OnlineEndpointTrackedResourceInner body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, OnlineEndpointTrackedResourceInner> + beginCreateOrUpdateAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body) { + Mono>> mono = + createOrUpdateWithResponseAsync(endpointName, resourceGroupName, workspaceName, body); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OnlineEndpointTrackedResourceInner.class, + OnlineEndpointTrackedResourceInner.class, + Context.NONE); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, OnlineEndpointTrackedResourceInner> + beginCreateOrUpdateAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(endpointName, resourceGroupName, workspaceName, body, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OnlineEndpointTrackedResourceInner.class, + OnlineEndpointTrackedResourceInner.class, + context); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OnlineEndpointTrackedResourceInner> + beginCreateOrUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body) { + return beginCreateOrUpdateAsync(endpointName, resourceGroupName, workspaceName, body).getSyncPoller(); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, OnlineEndpointTrackedResourceInner> + beginCreateOrUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body, + Context context) { + return beginCreateOrUpdateAsync(endpointName, resourceGroupName, workspaceName, body, context).getSyncPoller(); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String endpointName, String resourceGroupName, String workspaceName, OnlineEndpointTrackedResourceInner body) { + return beginCreateOrUpdateAsync(endpointName, resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body, + Context context) { + return beginCreateOrUpdateAsync(endpointName, resourceGroupName, workspaceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineEndpointTrackedResourceInner createOrUpdate( + String endpointName, String resourceGroupName, String workspaceName, OnlineEndpointTrackedResourceInner body) { + return createOrUpdateAsync(endpointName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Create or update Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineEndpointTrackedResourceInner createOrUpdate( + String endpointName, + String resourceGroupName, + String workspaceName, + OnlineEndpointTrackedResourceInner body, + Context context) { + return createOrUpdateAsync(endpointName, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint name. + * @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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync( + String endpointName, String resourceGroupName, String workspaceName) { + return listKeysWithResponseAsync(endpointName, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointAuthKeysInner listKeys(String endpointName, String resourceGroupName, String workspaceName) { + return listKeysAsync(endpointName, resourceGroupName, workspaceName).block(); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint name. + * @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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return listKeysWithResponseAsync(endpointName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> regenerateKeysWithResponseAsync( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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 + .regenerateKeys( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> regenerateKeysWithResponseAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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) { + 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(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + body, + accept, + context); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginRegenerateKeysAsync( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body) { + Mono>> mono = + regenerateKeysWithResponseAsync(endpointName, resourceGroupName, workspaceName, body); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginRegenerateKeysAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + RegenerateEndpointKeysRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + regenerateKeysWithResponseAsync(endpointName, resourceGroupName, workspaceName, body, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRegenerateKeys( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body) { + return beginRegenerateKeysAsync(endpointName, resourceGroupName, workspaceName, body).getSyncPoller(); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginRegenerateKeys( + String endpointName, + String resourceGroupName, + String workspaceName, + RegenerateEndpointKeysRequest body, + Context context) { + return beginRegenerateKeysAsync(endpointName, resourceGroupName, workspaceName, body, context).getSyncPoller(); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeysAsync( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body) { + return beginRegenerateKeysAsync(endpointName, resourceGroupName, workspaceName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeysAsync( + String endpointName, + String resourceGroupName, + String workspaceName, + RegenerateEndpointKeysRequest body, + Context context) { + return beginRegenerateKeysAsync(endpointName, resourceGroupName, workspaceName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void regenerateKeys( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body) { + regenerateKeysAsync(endpointName, resourceGroupName, workspaceName, body).block(); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void regenerateKeys( + String endpointName, + String resourceGroupName, + String workspaceName, + RegenerateEndpointKeysRequest body, + Context context) { + regenerateKeysAsync(endpointName, resourceGroupName, workspaceName, body, context).block(); + } + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint 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 service Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTokenWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .getToken( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint name. + * @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 service Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTokenWithResponseAsync( + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("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 + .getToken( + this.client.getEndpoint(), + endpointName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context); + } + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint 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 service Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getTokenAsync( + String endpointName, String resourceGroupName, String workspaceName) { + return getTokenWithResponseAsync(endpointName, resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint 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 service Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointAuthTokenInner getToken(String endpointName, String resourceGroupName, String workspaceName) { + return getTokenAsync(endpointName, resourceGroupName, workspaceName).block(); + } + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint name. + * @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 service Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTokenWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + return getTokenWithResponseAsync(endpointName, resourceGroupName, workspaceName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of OnlineEndpoint entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink 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 a paginated list of OnlineEndpoint entities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointsImpl.java new file mode 100644 index 000000000000..dc07464ecab1 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/OnlineEndpointsImpl.java @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.OnlineEndpointsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthTokenInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthKeys; +import com.azure.resourcemanager.machinelearningservices.models.EndpointAuthToken; +import com.azure.resourcemanager.machinelearningservices.models.EndpointComputeType; +import com.azure.resourcemanager.machinelearningservices.models.OnlineEndpointTrackedResource; +import com.azure.resourcemanager.machinelearningservices.models.OnlineEndpoints; +import com.azure.resourcemanager.machinelearningservices.models.OrderString; +import com.azure.resourcemanager.machinelearningservices.models.RegenerateEndpointKeysRequest; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OnlineEndpointsImpl implements OnlineEndpoints { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineEndpointsImpl.class); + + private final OnlineEndpointsClient innerClient; + + private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; + + public OnlineEndpointsImpl( + OnlineEndpointsClient innerClient, + com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.mapPage(inner, inner1 -> new OnlineEndpointTrackedResourceImpl(inner1, 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 Utils.mapPage(inner, inner1 -> new OnlineEndpointTrackedResourceImpl(inner1, this.manager())); + } + + public void delete(String endpointName, String resourceGroupName, String workspaceName) { + this.serviceClient().delete(endpointName, resourceGroupName, workspaceName); + } + + public void delete(String endpointName, String resourceGroupName, String workspaceName, Context context) { + this.serviceClient().delete(endpointName, resourceGroupName, workspaceName, context); + } + + public OnlineEndpointTrackedResource get(String endpointName, String resourceGroupName, String workspaceName) { + OnlineEndpointTrackedResourceInner inner = + this.serviceClient().get(endpointName, resourceGroupName, workspaceName); + if (inner != null) { + return new OnlineEndpointTrackedResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getWithResponse(endpointName, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OnlineEndpointTrackedResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EndpointAuthKeys listKeys(String endpointName, String resourceGroupName, String workspaceName) { + EndpointAuthKeysInner inner = this.serviceClient().listKeys(endpointName, resourceGroupName, workspaceName); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listKeysWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().listKeysWithResponse(endpointName, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EndpointAuthKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void regenerateKeys( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body) { + this.serviceClient().regenerateKeys(endpointName, resourceGroupName, workspaceName, body); + } + + public void regenerateKeys( + String endpointName, + String resourceGroupName, + String workspaceName, + RegenerateEndpointKeysRequest body, + Context context) { + this.serviceClient().regenerateKeys(endpointName, resourceGroupName, workspaceName, body, context); + } + + public EndpointAuthToken getToken(String endpointName, String resourceGroupName, String workspaceName) { + EndpointAuthTokenInner inner = this.serviceClient().getToken(endpointName, resourceGroupName, workspaceName); + if (inner != null) { + return new EndpointAuthTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getTokenWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context) { + Response inner = + this.serviceClient().getTokenWithResponse(endpointName, resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EndpointAuthTokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OnlineEndpointTrackedResource getById(String id) { + String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(endpointName, resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + return this.getWithResponse(endpointName, resourceGroupName, workspaceName, context); + } + + public void deleteById(String id) { + String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.delete(endpointName, resourceGroupName, workspaceName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + if (endpointName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + } + String resourceGroupName = Utils.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 = Utils.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))); + } + this.delete(endpointName, resourceGroupName, workspaceName, context); + } + + private OnlineEndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { + return this.serviceManager; + } + + public OnlineEndpointTrackedResourceImpl define(String name) { + return new OnlineEndpointTrackedResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionImpl.java index 1093bad93f93..ec17bda94ef3 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionImpl.java @@ -35,6 +35,10 @@ public String type() { return this.innerModel().type(); } + public Identity identity() { + return this.innerModel().identity(); + } + public String location() { return this.innerModel().location(); } @@ -48,6 +52,14 @@ public Map tags() { } } + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public PrivateEndpoint privateEndpoint() { return this.innerModel().privateEndpoint(); } @@ -60,18 +72,6 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public Identity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -105,7 +105,7 @@ public PrivateEndpointConnection create() { serviceManager .serviceClient() .getPrivateEndpointConnections() - .putWithResponse( + .createOrUpdateWithResponse( resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), Context.NONE) .getValue(); return this; @@ -116,7 +116,7 @@ public PrivateEndpointConnection create(Context context) { serviceManager .serviceClient() .getPrivateEndpointConnections() - .putWithResponse( + .createOrUpdateWithResponse( resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), context) .getValue(); return this; @@ -138,7 +138,7 @@ public PrivateEndpointConnection apply() { serviceManager .serviceClient() .getPrivateEndpointConnections() - .putWithResponse( + .createOrUpdateWithResponse( resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), Context.NONE) .getValue(); return this; @@ -149,7 +149,7 @@ public PrivateEndpointConnection apply(Context context) { serviceManager .serviceClient() .getPrivateEndpointConnections() - .putWithResponse( + .createOrUpdateWithResponse( resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), context) .getValue(); return this; @@ -200,24 +200,24 @@ public PrivateEndpointConnectionImpl withTags(Map tags) { return this; } - public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.innerModel().withPrivateEndpoint(privateEndpoint); + public PrivateEndpointConnectionImpl withIdentity(Identity identity) { + this.innerModel().withIdentity(identity); return this; } - public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + public PrivateEndpointConnectionImpl withSku(Sku sku) { + this.innerModel().withSku(sku); return this; } - public PrivateEndpointConnectionImpl withIdentity(Identity identity) { - this.innerModel().withIdentity(identity); + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.innerModel().withPrivateEndpoint(privateEndpoint); return this; } - public PrivateEndpointConnectionImpl withSku(Sku sku) { - this.innerModel().withSku(sku); + public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsClientImpl.java index cf4ba0bd8cfe..19ca21ba229e 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsClientImpl.java @@ -19,6 +19,10 @@ 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; @@ -27,6 +31,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearningservices.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.machinelearningservices.models.PrivateEndpointConnectionListResult; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ @@ -59,6 +64,21 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") private interface PrivateEndpointConnectionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" @@ -83,7 +103,7 @@ Mono> get( + "/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> put( + Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -112,10 +132,176 @@ Mono> delete( Context context); } + /** + * List all the private endpoint connections associated with the 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 private endpoint connection associated with the specified workspace. + */ + @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.")); + } + 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)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all the private endpoint connections associated with the 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 list of private endpoint connection associated with the specified workspace. + */ + @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)); + } + + /** + * List all the private endpoint connections associated with the 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 private endpoint connection associated with the specified workspace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName)); + } + + /** + * List all the private endpoint connections associated with the 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 list of private endpoint connection associated with the specified workspace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String workspaceName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context)); + } + + /** + * List all the private endpoint connections associated with the 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 private endpoint connection associated with the specified workspace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * List all the private endpoint connections associated with the 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 list of private endpoint connection associated with the specified workspace. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String workspaceName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + } + /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -171,7 +357,7 @@ private Mono> getWithResponseAsync( /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -225,7 +411,7 @@ private Mono> getWithResponseAsync( /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -250,7 +436,7 @@ private Mono getAsync( /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,7 +453,7 @@ public PrivateEndpointConnectionInner get( /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -285,7 +471,7 @@ public Response getWithResponse( /** * Update the state of specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -295,7 +481,7 @@ public Response getWithResponse( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, @@ -335,7 +521,7 @@ private Mono> putWithResponseAsync( .withContext( context -> service - .put( + .createOrUpdate( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -351,7 +537,7 @@ private Mono> putWithResponseAsync( /** * Update the state of specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -362,7 +548,7 @@ private Mono> putWithResponseAsync( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> putWithResponseAsync( + private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, @@ -401,7 +587,7 @@ private Mono> putWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .put( + .createOrUpdate( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -416,7 +602,7 @@ private Mono> putWithResponseAsync( /** * Update the state of specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -426,12 +612,13 @@ private Mono> putWithResponseAsync( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync( + private Mono createOrUpdateAsync( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - return putWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties) + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, privateEndpointConnectionName, properties) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -445,7 +632,7 @@ private Mono putAsync( /** * Update the state of specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -455,18 +642,18 @@ private Mono putAsync( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner put( + public PrivateEndpointConnectionInner createOrUpdate( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - return putAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties).block(); + return createOrUpdateAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties).block(); } /** * Update the state of specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -477,13 +664,13 @@ public PrivateEndpointConnectionInner put( * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, Context context) { - return putWithResponseAsync( + return createOrUpdateWithResponseAsync( resourceGroupName, workspaceName, privateEndpointConnectionName, properties, context) .block(); } @@ -491,7 +678,7 @@ public Response putWithResponse( /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -547,7 +734,7 @@ private Mono> deleteWithResponseAsync( /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -601,7 +788,7 @@ private Mono> deleteWithResponseAsync( /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -619,7 +806,7 @@ private Mono deleteAsync( /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -634,7 +821,7 @@ public void delete(String resourceGroupName, String workspaceName, String privat /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsImpl.java index 95ed5bd95517..b1ece727151c 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateEndpointConnectionsImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.machinelearningservices.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; @@ -28,6 +29,19 @@ public PrivateEndpointConnectionsImpl( this.serviceManager = serviceManager; } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, workspaceName); + return Utils.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 Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + public PrivateEndpointConnection get( String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { PrivateEndpointConnectionInner inner = diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesClientImpl.java index 325fcd67fc11..713ade17f3bf 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesClientImpl.java @@ -61,7 +61,7 @@ private interface PrivateLinkResourcesService { + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace( + Mono> list( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @@ -74,7 +74,7 @@ Mono> listByWorkspace( /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -82,7 +82,7 @@ Mono> listByWorkspace( * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceWithResponseAsync( + private Mono> listWithResponseAsync( String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono @@ -108,7 +108,7 @@ private Mono> listByWorkspaceWithRe .withContext( context -> service - .listByWorkspace( + .list( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -122,7 +122,7 @@ private Mono> listByWorkspaceWithRe /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -131,7 +131,7 @@ private Mono> listByWorkspaceWithRe * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceWithResponseAsync( + private Mono> listWithResponseAsync( String resourceGroupName, String workspaceName, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -155,7 +155,7 @@ private Mono> listByWorkspaceWithRe final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspace( + .list( this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, @@ -168,7 +168,7 @@ private Mono> listByWorkspaceWithRe /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -176,9 +176,8 @@ private Mono> listByWorkspaceWithRe * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listByWorkspaceAsync( - String resourceGroupName, String workspaceName) { - return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName) + private Mono listAsync(String resourceGroupName, String workspaceName) { + return listWithResponseAsync(resourceGroupName, workspaceName) .flatMap( (Response res) -> { if (res.getValue() != null) { @@ -192,7 +191,7 @@ private Mono listByWorkspaceAsync( /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -200,14 +199,14 @@ private Mono listByWorkspaceAsync( * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner listByWorkspace(String resourceGroupName, String workspaceName) { - return listByWorkspaceAsync(resourceGroupName, workspaceName).block(); + public PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName) { + return listAsync(resourceGroupName, workspaceName).block(); } /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -216,8 +215,8 @@ public PrivateLinkResourceListResultInner listByWorkspace(String resourceGroupNa * @return the private link resources that need to be created for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listByWorkspaceWithResponse( + public Response listWithResponse( String resourceGroupName, String workspaceName, Context context) { - return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block(); + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesImpl.java index 1a4e20c8cf30..5d49242c1da2 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/PrivateLinkResourcesImpl.java @@ -28,9 +28,8 @@ public PrivateLinkResourcesImpl( this.serviceManager = serviceManager; } - public PrivateLinkResourceListResult listByWorkspace(String resourceGroupName, String workspaceName) { - PrivateLinkResourceListResultInner inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + public PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName) { + PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, workspaceName); if (inner != null) { return new PrivateLinkResourceListResultImpl(inner, this.manager()); } else { @@ -38,10 +37,10 @@ public PrivateLinkResourceListResult listByWorkspace(String resourceGroupName, S } } - public Response listByWorkspaceWithResponse( + public Response listWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = - this.serviceClient().listByWorkspaceWithResponse(resourceGroupName, workspaceName, context); + this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ServiceResourceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ServiceResourceImpl.java deleted file mode 100644 index 4ca6ab23228d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/ServiceResourceImpl.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequest; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest; -import com.azure.resourcemanager.machinelearningservices.models.CreateServiceRequestKeys; -import com.azure.resourcemanager.machinelearningservices.models.Identity; -import com.azure.resourcemanager.machinelearningservices.models.ServiceResource; -import com.azure.resourcemanager.machinelearningservices.models.ServiceResponseBase; -import com.azure.resourcemanager.machinelearningservices.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class ServiceResourceImpl implements ServiceResource, ServiceResource.Definition, ServiceResource.Update { - private ServiceResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager 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 ServiceResponseBase properties() { - return this.innerModel().properties(); - } - - public Identity identity() { - return this.innerModel().identity(); - } - - 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 ServiceResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String serviceName; - - private CreateServiceRequest createProperties; - - private CreateServiceRequest updateProperties; - - public ServiceResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ServiceResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getMachineLearningServices() - .createOrUpdate(resourceGroupName, workspaceName, serviceName, createProperties, Context.NONE); - return this; - } - - public ServiceResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMachineLearningServices() - .createOrUpdate(resourceGroupName, workspaceName, serviceName, createProperties, context); - return this; - } - - ServiceResourceImpl( - String name, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = new ServiceResourceInner(); - this.serviceManager = serviceManager; - this.serviceName = name; - this.createProperties = new CreateServiceRequest(); - } - - public ServiceResourceImpl update() { - this.updateProperties = new CreateServiceRequest(); - return this; - } - - public ServiceResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMachineLearningServices() - .createOrUpdate(resourceGroupName, workspaceName, serviceName, updateProperties, Context.NONE); - return this; - } - - public ServiceResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMachineLearningServices() - .createOrUpdate(resourceGroupName, workspaceName, serviceName, updateProperties, context); - return this; - } - - ServiceResourceImpl( - ServiceResourceInner innerObject, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.serviceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - } - - public ServiceResource refresh() { - Boolean localExpand = null; - this.innerObject = - serviceManager - .serviceClient() - .getMachineLearningServices() - .getWithResponse(resourceGroupName, workspaceName, serviceName, localExpand, Context.NONE) - .getValue(); - return this; - } - - public ServiceResource refresh(Context context) { - Boolean localExpand = null; - this.innerObject = - serviceManager - .serviceClient() - .getMachineLearningServices() - .getWithResponse(resourceGroupName, workspaceName, serviceName, localExpand, context) - .getValue(); - return this; - } - - public ServiceResourceImpl withRegion(Region location) { - this.createProperties.withLocation(location.toString()); - return this; - } - - public ServiceResourceImpl withRegion(String location) { - this.createProperties.withLocation(location); - return this; - } - - public ServiceResourceImpl withDescription(String description) { - if (isInCreateMode()) { - this.createProperties.withDescription(description); - return this; - } else { - this.updateProperties.withDescription(description); - return this; - } - } - - public ServiceResourceImpl withKvTags(Map kvTags) { - if (isInCreateMode()) { - this.createProperties.withKvTags(kvTags); - return this; - } else { - this.updateProperties.withKvTags(kvTags); - return this; - } - } - - public ServiceResourceImpl withProperties(Map properties) { - if (isInCreateMode()) { - this.createProperties.withProperties(properties); - return this; - } else { - this.updateProperties.withProperties(properties); - return this; - } - } - - public ServiceResourceImpl withKeys(CreateServiceRequestKeys keys) { - if (isInCreateMode()) { - this.createProperties.withKeys(keys); - return this; - } else { - this.updateProperties.withKeys(keys); - return this; - } - } - - public ServiceResourceImpl withEnvironmentImageRequest( - CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - if (isInCreateMode()) { - this.createProperties.withEnvironmentImageRequest(environmentImageRequest); - return this; - } else { - this.updateProperties.withEnvironmentImageRequest(environmentImageRequest); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsClientImpl.java deleted file mode 100644 index 3530debed2c8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsClientImpl.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.StorageAccountsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in StorageAccountsClient. */ -public final class StorageAccountsClientImpl implements StorageAccountsClient { - private final ClientLogger logger = new ClientLogger(StorageAccountsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final StorageAccountsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of StorageAccountsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - StorageAccountsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(StorageAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesStorageAccounts to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - private interface StorageAccountsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") 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); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - 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(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @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); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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) - private Mono listKeysAsync(String resourceGroupName, String workspaceName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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 ListStorageAccountKeysResultInner listKeys(String resourceGroupName, String workspaceName) { - return listKeysAsync(resourceGroupName, workspaceName).block(); - } - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsImpl.java deleted file mode 100644 index 204593a11112..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/StorageAccountsImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.StorageAccountsClient; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearningservices.models.ListStorageAccountKeysResult; -import com.azure.resourcemanager.machinelearningservices.models.StorageAccounts; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class StorageAccountsImpl implements StorageAccounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageAccountsImpl.class); - - private final StorageAccountsClient innerClient; - - private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - - public StorageAccountsImpl( - StorageAccountsClient innerClient, - com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ListStorageAccountKeysResult listKeys(String resourceGroupName, String workspaceName) { - ListStorageAccountKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListStorageAccountKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ListStorageAccountKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private StorageAccountsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizeListResultImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizeListResultImpl.java index 8e9621b0b80e..bd99f2437415 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizeListResultImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/VirtualMachineSizeListResultImpl.java @@ -22,8 +22,8 @@ public final class VirtualMachineSizeListResultImpl implements VirtualMachineSiz this.serviceManager = serviceManager; } - public List amlCompute() { - List inner = this.innerModel().amlCompute(); + public List value() { + List inner = this.innerModel().value(); if (inner != null) { return Collections.unmodifiableList(inner); } else { diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionImpl.java index db3468ff5543..36b626603b2c 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionImpl.java @@ -8,7 +8,6 @@ import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; import com.azure.resourcemanager.machinelearningservices.models.ValueFormat; import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnection; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnectionDto; public final class WorkspaceConnectionImpl implements WorkspaceConnection, WorkspaceConnection.Definition { private WorkspaceConnectionInner innerObject; @@ -68,8 +67,6 @@ private com.azure.resourcemanager.machinelearningservices.MachineLearningService private String connectionName; - private WorkspaceConnectionDto createParameters; - public WorkspaceConnectionImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; @@ -81,7 +78,7 @@ public WorkspaceConnection create() { serviceManager .serviceClient() .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, createParameters, Context.NONE) + .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -91,7 +88,7 @@ public WorkspaceConnection create(Context context) { serviceManager .serviceClient() .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, createParameters, context) + .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), context) .getValue(); return this; } @@ -101,7 +98,6 @@ public WorkspaceConnection create(Context context) { this.innerObject = new WorkspaceConnectionInner(); this.serviceManager = serviceManager; this.connectionName = name; - this.createParameters = new WorkspaceConnectionDto(); } public WorkspaceConnection refresh() { @@ -124,33 +120,28 @@ public WorkspaceConnection refresh(Context context) { return this; } - public WorkspaceConnectionImpl withName(String name) { - this.createParameters.withName(name); - return this; - } - public WorkspaceConnectionImpl withCategory(String category) { - this.createParameters.withCategory(category); + this.innerModel().withCategory(category); return this; } public WorkspaceConnectionImpl withTarget(String target) { - this.createParameters.withTarget(target); + this.innerModel().withTarget(target); return this; } public WorkspaceConnectionImpl withAuthType(String authType) { - this.createParameters.withAuthType(authType); + this.innerModel().withAuthType(authType); return this; } public WorkspaceConnectionImpl withValue(String value) { - this.createParameters.withValue(value); + this.innerModel().withValue(value); return this; } public WorkspaceConnectionImpl withValueFormat(ValueFormat valueFormat) { - this.createParameters.withValueFormat(valueFormat); + this.innerModel().withValueFormat(valueFormat); return this; } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsClientImpl.java index 90d23d115a65..1f248c2b9e35 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsClientImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceConnectionsClientImpl.java @@ -32,7 +32,6 @@ import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceConnectionsClient; import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceConnectionInner; import com.azure.resourcemanager.machinelearningservices.models.PaginatedWorkspaceConnectionsList; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceConnectionDto; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ @@ -94,7 +93,7 @@ Mono> create( @PathParam("workspaceName") String workspaceName, @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkspaceConnectionDto parameters, + @BodyParam("application/json") WorkspaceConnectionInner parameters, @HeaderParam("Accept") String accept, Context context); @@ -134,7 +133,7 @@ Mono> delete( /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -190,7 +189,7 @@ private Mono> listSinglePageAsync( /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -244,7 +243,7 @@ private Mono> listSinglePageAsync( /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -262,7 +261,7 @@ private PagedFlux listAsync( /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -279,7 +278,7 @@ private PagedFlux listAsync(String resourceGroupName, /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -298,7 +297,7 @@ private PagedFlux listAsync( /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -315,7 +314,7 @@ public PagedIterable list(String resourceGroupName, St /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -334,7 +333,7 @@ public PagedIterable list( /** * Add a new workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param parameters The object for creating or updating a new workspace connection. @@ -345,7 +344,7 @@ public PagedIterable list( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionDto parameters) { + String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -394,7 +393,7 @@ private Mono> createWithResponseAsync( /** * Add a new workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param parameters The object for creating or updating a new workspace connection. @@ -409,7 +408,7 @@ private Mono> createWithResponseAsync( String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionDto parameters, + WorkspaceConnectionInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono @@ -456,7 +455,7 @@ private Mono> createWithResponseAsync( /** * Add a new workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param parameters The object for creating or updating a new workspace connection. @@ -467,7 +466,7 @@ private Mono> createWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionDto parameters) { + String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters) { return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters) .flatMap( (Response res) -> { @@ -482,7 +481,7 @@ private Mono createAsync( /** * Add a new workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param parameters The object for creating or updating a new workspace connection. @@ -493,14 +492,14 @@ private Mono createAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public WorkspaceConnectionInner create( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionDto parameters) { + String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters) { return createAsync(resourceGroupName, workspaceName, connectionName, parameters).block(); } /** * Add a new workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param parameters The object for creating or updating a new workspace connection. @@ -515,7 +514,7 @@ public Response createWithResponse( String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionDto parameters, + WorkspaceConnectionInner parameters, Context context) { return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters, context).block(); } @@ -523,7 +522,7 @@ public Response createWithResponse( /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -576,7 +575,7 @@ private Mono> getWithResponseAsync( /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. @@ -627,7 +626,7 @@ private Mono> getWithResponseAsync( /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -652,7 +651,7 @@ private Mono getAsync( /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -668,7 +667,7 @@ public WorkspaceConnectionInner get(String resourceGroupName, String workspaceNa /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. @@ -686,7 +685,7 @@ public Response getWithResponse( /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -739,7 +738,7 @@ private Mono> deleteWithResponseAsync( /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. @@ -790,7 +789,7 @@ private Mono> deleteWithResponseAsync( /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -807,7 +806,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -822,7 +821,7 @@ public void delete(String resourceGroupName, String workspaceName, String connec /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesClientImpl.java index 41defbc03575..9173d3513a61 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesClientImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceFeaturesClientImpl.java @@ -88,7 +88,7 @@ Mono> listNext( /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -145,7 +145,7 @@ private Mono> listSinglePageAsync( /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -200,7 +200,7 @@ private Mono> listSinglePageAsync( /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -216,7 +216,7 @@ private PagedFlux listAsync(String resourceGroupName, Strin /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -234,7 +234,7 @@ private PagedFlux listAsync(String resourceGroupName, Strin /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -249,7 +249,7 @@ public PagedIterable list(String resourceGroupName, String /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceImpl.java index 0f477e8e9d49..78ec0fd43ea8 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceImpl.java @@ -13,6 +13,8 @@ import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; import com.azure.resourcemanager.machinelearningservices.models.EncryptionProperty; import com.azure.resourcemanager.machinelearningservices.models.Identity; +import com.azure.resourcemanager.machinelearningservices.models.ListNotebookKeysResult; +import com.azure.resourcemanager.machinelearningservices.models.ListStorageAccountKeysResult; import com.azure.resourcemanager.machinelearningservices.models.ListWorkspaceKeysResult; import com.azure.resourcemanager.machinelearningservices.models.NotebookAccessTokenResult; import com.azure.resourcemanager.machinelearningservices.models.NotebookResourceInfo; @@ -45,6 +47,10 @@ public String type() { return this.innerModel().type(); } + public Identity identity() { + return this.innerModel().identity(); + } + public String location() { return this.innerModel().location(); } @@ -58,6 +64,14 @@ public Map tags() { } } + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String workspaceId() { return this.innerModel().workspaceId(); } @@ -162,18 +176,6 @@ public String tenantId() { return this.innerModel().tenantId(); } - public Identity identity() { - return this.innerModel().identity(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - public Region region() { return Region.fromName(this.regionName()); } @@ -306,6 +308,32 @@ public Response listNotebookAccessTokenWithResponse(C .listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); } + public NotebookResourceInfo prepareNotebook() { + return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); + } + + public NotebookResourceInfo prepareNotebook(Context context) { + return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); + } + + public ListStorageAccountKeysResult listStorageAccountKeys() { + return serviceManager.workspaces().listStorageAccountKeys(resourceGroupName, workspaceName); + } + + public Response listStorageAccountKeysWithResponse(Context context) { + return serviceManager + .workspaces() + .listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); + } + + public ListNotebookKeysResult listNotebookKeys() { + return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); + } + + public Response listNotebookKeysWithResponse(Context context) { + return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); + } + public WorkspaceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -326,6 +354,26 @@ public WorkspaceImpl withTags(Map tags) { } } + public WorkspaceImpl withIdentity(Identity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } + } + + public WorkspaceImpl withSku(Sku sku) { + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateParameters.withSku(sku); + return this; + } + } + public WorkspaceImpl withDescription(String description) { if (isInCreateMode()) { this.innerModel().withDescription(description); @@ -422,26 +470,6 @@ public WorkspaceImpl withPrimaryUserAssignedIdentity(String primaryUserAssignedI } } - public WorkspaceImpl withIdentity(Identity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateParameters.withIdentity(identity); - return this; - } - } - - public WorkspaceImpl withSku(Sku sku) { - if (isInCreateMode()) { - this.innerModel().withSku(sku); - return this; - } else { - this.updateParameters.withSku(sku); - return this; - } - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkusClientImpl.java similarity index 84% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsClientImpl.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkusClientImpl.java index 60e248d95dc9..70f705fcc1c2 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsClientImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkusClientImpl.java @@ -26,44 +26,44 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceOperationsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceSkusClient; import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; import com.azure.resourcemanager.machinelearningservices.models.SkuListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkspaceOperationsClient. */ -public final class WorkspaceOperationsClientImpl implements WorkspaceOperationsClient { - private final ClientLogger logger = new ClientLogger(WorkspaceOperationsClientImpl.class); +/** An instance of this class provides access to all the operations defined in WorkspaceSkusClient. */ +public final class WorkspaceSkusClientImpl implements WorkspaceSkusClient { + private final ClientLogger logger = new ClientLogger(WorkspaceSkusClientImpl.class); /** The proxy service used to perform REST calls. */ - private final WorkspaceOperationsService service; + private final WorkspaceSkusService service; /** The service client containing this operation class. */ private final AzureMachineLearningWorkspacesImpl client; /** - * Initializes an instance of WorkspaceOperationsClientImpl. + * Initializes an instance of WorkspaceSkusClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspaceOperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspaceSkusClientImpl(AzureMachineLearningWorkspacesImpl client) { this.service = - RestProxy.create(WorkspaceOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + RestProxy.create(WorkspaceSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceOperations to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceSkus to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") - private interface WorkspaceOperationsService { + private interface WorkspaceSkusService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus( + Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @@ -74,7 +74,7 @@ Mono> listSkus( @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkusNext( + Mono> listNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, @@ -89,7 +89,7 @@ Mono> listSkusNext( * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync() { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { return Mono .error( @@ -107,7 +107,7 @@ private Mono> listSkusSinglePageAsync() { .withContext( context -> service - .listSkus( + .list( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -135,7 +135,7 @@ private Mono> listSkusSinglePageAsync() { * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync(Context context) { + private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -151,7 +151,7 @@ private Mono> listSkusSinglePageAsync(Context c final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listSkus( + .list( this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), @@ -176,8 +176,8 @@ private Mono> listSkusSinglePageAsync(Context c * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync() { - return new PagedFlux<>(() -> listSkusSinglePageAsync(), nextLink -> listSkusNextSinglePageAsync(nextLink)); + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -190,9 +190,9 @@ private PagedFlux listSkusAsync() { * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(Context context) { + private PagedFlux listAsync(Context context) { return new PagedFlux<>( - () -> listSkusSinglePageAsync(context), nextLink -> listSkusNextSinglePageAsync(nextLink, context)); + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** @@ -203,8 +203,8 @@ private PagedFlux listSkusAsync(Context context) { * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus() { - return new PagedIterable<>(listSkusAsync()); + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** @@ -217,8 +217,8 @@ public PagedIterable listSkus() { * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus(Context context) { - return new PagedIterable<>(listSkusAsync(context)); + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** @@ -231,7 +231,7 @@ public PagedIterable listSkus(Context context) { * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -243,7 +243,7 @@ private Mono> listSkusNextSinglePageAsync(Strin } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSkusNext(nextLink, this.client.getEndpoint(), accept, context)) + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( res -> new PagedResponseBase<>( @@ -267,7 +267,7 @@ private Mono> listSkusNextSinglePageAsync(Strin * @return list of skus with features. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -280,7 +280,7 @@ private Mono> listSkusNextSinglePageAsync(Strin final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listSkusNext(nextLink, this.client.getEndpoint(), accept, context) + .listNext(nextLink, this.client.getEndpoint(), accept, context) .map( res -> new PagedResponseBase<>( diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkusImpl.java similarity index 75% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsImpl.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkusImpl.java index 757f5afc2b2f..aecb55dcb920 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceOperationsImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspaceSkusImpl.java @@ -7,37 +7,37 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceOperationsClient; +import com.azure.resourcemanager.machinelearningservices.fluent.WorkspaceSkusClient; import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceSkuInner; -import com.azure.resourcemanager.machinelearningservices.models.WorkspaceOperations; import com.azure.resourcemanager.machinelearningservices.models.WorkspaceSku; +import com.azure.resourcemanager.machinelearningservices.models.WorkspaceSkus; import com.fasterxml.jackson.annotation.JsonIgnore; -public final class WorkspaceOperationsImpl implements WorkspaceOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceOperationsImpl.class); +public final class WorkspaceSkusImpl implements WorkspaceSkus { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceSkusImpl.class); - private final WorkspaceOperationsClient innerClient; + private final WorkspaceSkusClient innerClient; private final com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager; - public WorkspaceOperationsImpl( - WorkspaceOperationsClient innerClient, + public WorkspaceSkusImpl( + WorkspaceSkusClient innerClient, com.azure.resourcemanager.machinelearningservices.MachineLearningServicesManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listSkus() { - PagedIterable inner = this.serviceClient().listSkus(); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); return Utils.mapPage(inner, inner1 -> new WorkspaceSkuImpl(inner1, this.manager())); } - public PagedIterable listSkus(Context context) { - PagedIterable inner = this.serviceClient().listSkus(context); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); return Utils.mapPage(inner, inner1 -> new WorkspaceSkuImpl(inner1, this.manager())); } - private WorkspaceOperationsClient serviceClient() { + private WorkspaceSkusClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesClientImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesClientImpl.java index 741ed1c013b0..309848b63022 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesClientImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesClientImpl.java @@ -35,8 +35,11 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearningservices.fluent.WorkspacesClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; import com.azure.resourcemanager.machinelearningservices.models.WorkspaceListResult; import com.azure.resourcemanager.machinelearningservices.models.WorkspaceUpdateParameters; @@ -206,6 +209,51 @@ Mono> listNotebookAccessToken( @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("$host") 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}/listStorageAccountKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listStorageAccountKeys( + @HostParam("$host") 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> listNotebookKeys( + @HostParam("$host") 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}) @@ -230,7 +278,7 @@ Mono> listBySubscriptionNext( /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -278,7 +326,7 @@ private Mono> getByResourceGroupWithResponseAsync( /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -324,7 +372,7 @@ private Mono> getByResourceGroupWithResponseAsync( /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -347,7 +395,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -362,7 +410,7 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -379,7 +427,7 @@ public Response getByResourceGroupWithResponse( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -434,7 +482,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -487,7 +535,7 @@ private Mono>> createOrUpdateWithResponseAsync( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -509,7 +557,7 @@ private PollerFlux, WorkspaceInner> beginCreateOrUpda /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -533,7 +581,7 @@ private PollerFlux, WorkspaceInner> beginCreateOrUpda /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -550,7 +598,7 @@ public SyncPoller, WorkspaceInner> beginCreateOrUpdat /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -568,7 +616,7 @@ public SyncPoller, WorkspaceInner> beginCreateOrUpdat /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -587,7 +635,7 @@ private Mono createOrUpdateAsync( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -607,7 +655,7 @@ private Mono createOrUpdateAsync( /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -623,7 +671,7 @@ public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceN /** * Creates or updates a workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -641,7 +689,7 @@ public WorkspaceInner createOrUpdate( /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -688,7 +736,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -734,7 +782,7 @@ private Mono>> deleteWithResponseAsync( /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -752,7 +800,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -773,7 +821,7 @@ private PollerFlux, Void> beginDeleteAsync( /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -788,7 +836,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -805,7 +853,7 @@ public SyncPoller, Void> beginDelete( /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -820,7 +868,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName) { /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -838,7 +886,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, C /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -852,7 +900,7 @@ public void delete(String resourceGroupName, String workspaceName) { /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -867,7 +915,7 @@ public void delete(String resourceGroupName, String workspaceName, Context conte /** * Updates a machine learning workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -922,7 +970,7 @@ private Mono> updateWithResponseAsync( /** * Updates a machine learning workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -975,7 +1023,7 @@ private Mono> updateWithResponseAsync( /** * Updates a machine learning workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1000,7 +1048,7 @@ private Mono updateAsync( /** * Updates a machine learning workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1016,7 +1064,7 @@ public WorkspaceInner update(String resourceGroupName, String workspaceName, Wor /** * Updates a machine learning workspace with the specified parameters. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1034,7 +1082,7 @@ public Response updateWithResponse( /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1088,7 +1136,7 @@ private Mono> listByResourceGroupSinglePageAsync( /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param skip Continuation token for pagination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1140,7 +1188,7 @@ private Mono> listByResourceGroupSinglePageAsync( /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1157,7 +1205,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1174,7 +1222,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param skip Continuation token for pagination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1192,7 +1240,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1207,7 +1255,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param skip Continuation token for pagination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1224,7 +1272,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1273,7 +1321,7 @@ private Mono> listKeysWithResponseAsync( * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1320,7 +1368,7 @@ private Mono> listKeysWithResponseAsync( * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1344,7 +1392,7 @@ private Mono listKeysAsync(String resourceGroupNam * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1360,7 +1408,7 @@ public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String wo * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1378,7 +1426,7 @@ public Response listKeysWithResponse( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1427,7 +1475,7 @@ private Mono>> resyncKeysWithResponseAsync( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1474,7 +1522,7 @@ private Mono>> resyncKeysWithResponseAsync( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1493,7 +1541,7 @@ private PollerFlux, Void> beginResyncKeysAsync(String resourceG * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1515,7 +1563,7 @@ private PollerFlux, Void> beginResyncKeysAsync( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1531,7 +1579,7 @@ public SyncPoller, Void> beginResyncKeys(String resourceGroupNa * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1549,7 +1597,7 @@ public SyncPoller, Void> beginResyncKeys( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1567,7 +1615,7 @@ private Mono resyncKeysAsync(String resourceGroupName, String workspaceNam * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1586,7 +1634,7 @@ private Mono resyncKeysAsync(String resourceGroupName, String workspaceNam * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1601,7 +1649,7 @@ public 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 Name of the resource group in which workspace is located. + * @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. @@ -1782,7 +1830,7 @@ public PagedIterable list(String skip, Context context) { /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1830,7 +1878,7 @@ private Mono> listNotebookAccessTokenWi /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1876,7 +1924,7 @@ private Mono> listNotebookAccessTokenWi /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1900,7 +1948,7 @@ private Mono listNotebookAccessTokenAsync( /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1915,7 +1963,7 @@ public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGro /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -1929,6 +1977,510 @@ public Response listNotebookAccessTokenWithRespo return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); } + /** + * @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) + 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(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * @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. + */ + @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.")); + } + 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); + } + + /** + * @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) + 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, + Context.NONE); + } + + /** + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, NotebookResourceInfoInner> beginPrepareNotebookAsync( + String resourceGroupName, String workspaceName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + prepareNotebookWithResponseAsync(resourceGroupName, workspaceName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + NotebookResourceInfoInner.class, + NotebookResourceInfoInner.class, + context); + } + + /** + * @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 SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( + String resourceGroupName, String workspaceName) { + return beginPrepareNotebookAsync(resourceGroupName, workspaceName).getSyncPoller(); + } + + /** + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( + String resourceGroupName, String workspaceName, Context context) { + return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).getSyncPoller(); + } + + /** + * @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) + private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName) { + return beginPrepareNotebookAsync(resourceGroupName, workspaceName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono prepareNotebookAsync( + String resourceGroupName, String workspaceName, Context context) { + return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * @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 NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName) { + return prepareNotebookAsync(resourceGroupName, workspaceName).block(); + } + + /** + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context) { + return prepareNotebookAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * @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) + 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"; + return FluxUtil + .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())); + } + + /** + * @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. + */ + @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); + } + + /** + * @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) + private Mono listStorageAccountKeysAsync( + String resourceGroupName, String workspaceName) { + return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * @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 ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { + return listStorageAccountKeysAsync(resourceGroupName, workspaceName).block(); + } + + /** + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStorageAccountKeysWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * @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) + 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())); + } + + /** + * @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. + */ + @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); + } + + /** + * @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) + private Mono listNotebookKeysAsync(String resourceGroupName, String workspaceName) { + return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * @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 ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { + return listNotebookKeysAsync(resourceGroupName, workspaceName).block(); + } + + /** + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listNotebookKeysWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesImpl.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesImpl.java index 888ca436ae31..7a94fa26a439 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesImpl.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/implementation/WorkspacesImpl.java @@ -10,11 +10,17 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearningservices.fluent.WorkspacesClient; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ListNotebookKeysResultInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ListStorageAccountKeysResultInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.ListWorkspaceKeysResultInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookAccessTokenResultInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearningservices.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.machinelearningservices.models.ListNotebookKeysResult; +import com.azure.resourcemanager.machinelearningservices.models.ListStorageAccountKeysResult; import com.azure.resourcemanager.machinelearningservices.models.ListWorkspaceKeysResult; import com.azure.resourcemanager.machinelearningservices.models.NotebookAccessTokenResult; +import com.azure.resourcemanager.machinelearningservices.models.NotebookResourceInfo; import com.azure.resourcemanager.machinelearningservices.models.Workspace; import com.azure.resourcemanager.machinelearningservices.models.Workspaces; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -143,6 +149,74 @@ public Response listNotebookAccessTokenWithResponse( } } + 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 NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { + NotebookResourceInfoInner inner = + this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); + if (inner != null) { + return new NotebookResourceInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName) { + ListStorageAccountKeysResultInner inner = + this.serviceClient().listStorageAccountKeys(resourceGroupName, workspaceName); + if (inner != null) { + return new ListStorageAccountKeysResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listStorageAccountKeysWithResponse( + String resourceGroupName, 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; + } + } + + public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { + ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); + if (inner != null) { + return new ListNotebookKeysResultImpl(inner, this.manager()); + } else { + return null; + } + } + + 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 Workspace getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AccountKeyDatastoreCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AccountKeyDatastoreCredentials.java new file mode 100644 index 000000000000..6f165a2bdad0 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AccountKeyDatastoreCredentials.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Account key datastore credentials configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") +@JsonTypeName("AccountKey") +@Fluent +public final class AccountKeyDatastoreCredentials extends DatastoreCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountKeyDatastoreCredentials.class); + + /* + * Storage account secrets. + */ + @JsonProperty(value = "secrets") + private AccountKeyDatastoreSecrets secrets; + + /** + * Get the secrets property: Storage account secrets. + * + * @return the secrets value. + */ + public AccountKeyDatastoreSecrets secrets() { + return this.secrets; + } + + /** + * Set the secrets property: Storage account secrets. + * + * @param secrets the secrets value to set. + * @return the AccountKeyDatastoreCredentials object itself. + */ + public AccountKeyDatastoreCredentials withSecrets(AccountKeyDatastoreSecrets 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 (secrets() != null) { + secrets().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AccountKeyDatastoreSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AccountKeyDatastoreSecrets.java new file mode 100644 index 000000000000..5df10c8dc603 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AccountKeyDatastoreSecrets.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Datastore account key secrets. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") +@JsonTypeName("AccountKey") +@Fluent +public final class AccountKeyDatastoreSecrets extends DatastoreSecretsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountKeyDatastoreSecrets.class); + + /* + * Storage account key. + */ + @JsonProperty(value = "key") + private String key; + + /** + * Get the key property: Storage account key. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Storage account key. + * + * @param key the key value to set. + * @return the AccountKeyDatastoreSecrets object itself. + */ + public AccountKeyDatastoreSecrets withKey(String key) { + this.key = key; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequest.java deleted file mode 100644 index 346384dd5251..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequest.java +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The AciServiceCreateRequest model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("ACI") -@Fluent -public final class AciServiceCreateRequest extends CreateServiceRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceCreateRequest.class); - - /* - * The container resource requirements. - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /* - * Whether or not authentication is enabled on the service. - */ - @JsonProperty(value = "authEnabled") - private Boolean authEnabled; - - /* - * Whether or not SSL is enabled. - */ - @JsonProperty(value = "sslEnabled") - private Boolean sslEnabled; - - /* - * Whether or not Application Insights is enabled. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * Details of the data collection options specified. - */ - @JsonProperty(value = "dataCollection") - private AciServiceCreateRequestDataCollection dataCollection; - - /* - * The public SSL certificate in PEM format to use if SSL is enabled. - */ - @JsonProperty(value = "sslCertificate") - private String sslCertificate; - - /* - * The public SSL key in PEM format for the certificate. - */ - @JsonProperty(value = "sslKey") - private String sslKey; - - /* - * The CName for the service. - */ - @JsonProperty(value = "cname") - private String cname; - - /* - * The Dns label for the service. - */ - @JsonProperty(value = "dnsNameLabel") - private String dnsNameLabel; - - /* - * The virtual network configuration. - */ - @JsonProperty(value = "vnetConfiguration") - private AciServiceCreateRequestVnetConfiguration vnetConfiguration; - - /* - * The encryption properties. - */ - @JsonProperty(value = "encryptionProperties") - private AciServiceCreateRequestEncryptionProperties encryptionProperties; - - /** - * Get the containerResourceRequirements property: The container resource requirements. - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The container resource requirements. - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withContainerResourceRequirements( - ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the authEnabled property: Whether or not authentication is enabled on the service. - * - * @return the authEnabled value. - */ - public Boolean authEnabled() { - return this.authEnabled; - } - - /** - * Set the authEnabled property: Whether or not authentication is enabled on the service. - * - * @param authEnabled the authEnabled value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - return this; - } - - /** - * Get the sslEnabled property: Whether or not SSL is enabled. - * - * @return the sslEnabled value. - */ - public Boolean sslEnabled() { - return this.sslEnabled; - } - - /** - * Set the sslEnabled property: Whether or not SSL is enabled. - * - * @param sslEnabled the sslEnabled value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withSslEnabled(Boolean sslEnabled) { - this.sslEnabled = sslEnabled; - return this; - } - - /** - * Get the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the dataCollection property: Details of the data collection options specified. - * - * @return the dataCollection value. - */ - public AciServiceCreateRequestDataCollection dataCollection() { - return this.dataCollection; - } - - /** - * Set the dataCollection property: Details of the data collection options specified. - * - * @param dataCollection the dataCollection value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withDataCollection(AciServiceCreateRequestDataCollection dataCollection) { - this.dataCollection = dataCollection; - return this; - } - - /** - * Get the sslCertificate property: The public SSL certificate in PEM format to use if SSL is enabled. - * - * @return the sslCertificate value. - */ - public String sslCertificate() { - return this.sslCertificate; - } - - /** - * Set the sslCertificate property: The public SSL certificate in PEM format to use if SSL is enabled. - * - * @param sslCertificate the sslCertificate value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withSslCertificate(String sslCertificate) { - this.sslCertificate = sslCertificate; - return this; - } - - /** - * Get the sslKey property: The public SSL key in PEM format for the certificate. - * - * @return the sslKey value. - */ - public String sslKey() { - return this.sslKey; - } - - /** - * Set the sslKey property: The public SSL key in PEM format for the certificate. - * - * @param sslKey the sslKey value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withSslKey(String sslKey) { - this.sslKey = sslKey; - return this; - } - - /** - * Get the cname property: The CName for the service. - * - * @return the cname value. - */ - public String cname() { - return this.cname; - } - - /** - * Set the cname property: The CName for the service. - * - * @param cname the cname value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withCname(String cname) { - this.cname = cname; - return this; - } - - /** - * Get the dnsNameLabel property: The Dns label for the service. - * - * @return the dnsNameLabel value. - */ - public String dnsNameLabel() { - return this.dnsNameLabel; - } - - /** - * Set the dnsNameLabel property: The Dns label for the service. - * - * @param dnsNameLabel the dnsNameLabel value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withDnsNameLabel(String dnsNameLabel) { - this.dnsNameLabel = dnsNameLabel; - return this; - } - - /** - * Get the vnetConfiguration property: The virtual network configuration. - * - * @return the vnetConfiguration value. - */ - public AciServiceCreateRequestVnetConfiguration vnetConfiguration() { - return this.vnetConfiguration; - } - - /** - * Set the vnetConfiguration property: The virtual network configuration. - * - * @param vnetConfiguration the vnetConfiguration value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withVnetConfiguration(AciServiceCreateRequestVnetConfiguration vnetConfiguration) { - this.vnetConfiguration = vnetConfiguration; - return this; - } - - /** - * Get the encryptionProperties property: The encryption properties. - * - * @return the encryptionProperties value. - */ - public AciServiceCreateRequestEncryptionProperties encryptionProperties() { - return this.encryptionProperties; - } - - /** - * Set the encryptionProperties property: The encryption properties. - * - * @param encryptionProperties the encryptionProperties value to set. - * @return the AciServiceCreateRequest object itself. - */ - public AciServiceCreateRequest withEncryptionProperties( - AciServiceCreateRequestEncryptionProperties encryptionProperties) { - this.encryptionProperties = encryptionProperties; - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withKeys(CreateServiceRequestKeys keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withEnvironmentImageRequest( - CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - super.withEnvironmentImageRequest(environmentImageRequest); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequest withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - if (dataCollection() != null) { - dataCollection().validate(); - } - if (vnetConfiguration() != null) { - vnetConfiguration().validate(); - } - if (encryptionProperties() != null) { - encryptionProperties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestDataCollection.java deleted file mode 100644 index b4258545d009..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestDataCollection.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Details of the data collection options specified. */ -@Immutable -public final class AciServiceCreateRequestDataCollection extends ModelDataCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceCreateRequestDataCollection.class); - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - super.withEventHubEnabled(eventHubEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestDataCollection withStorageEnabled(Boolean storageEnabled) { - super.withStorageEnabled(storageEnabled); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestEncryptionProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestEncryptionProperties.java deleted file mode 100644 index 5b64ba2318e6..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestEncryptionProperties.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.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The encryption properties. */ -@Immutable -public final class AciServiceCreateRequestEncryptionProperties extends EncryptionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceCreateRequestEncryptionProperties.class); - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestEncryptionProperties withVaultBaseUrl(String vaultBaseUrl) { - super.withVaultBaseUrl(vaultBaseUrl); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestEncryptionProperties withKeyName(String keyName) { - super.withKeyName(keyName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestEncryptionProperties withKeyVersion(String keyVersion) { - super.withKeyVersion(keyVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestVnetConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestVnetConfiguration.java deleted file mode 100644 index 90bc63506146..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceCreateRequestVnetConfiguration.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The virtual network configuration. */ -@Immutable -public final class AciServiceCreateRequestVnetConfiguration extends VnetConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceCreateRequestVnetConfiguration.class); - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestVnetConfiguration withVnetName(String vnetName) { - super.withVnetName(vnetName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceCreateRequestVnetConfiguration withSubnetName(String subnetName) { - super.withSubnetName(subnetName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponse.java deleted file mode 100644 index 547fad2ec766..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponse.java +++ /dev/null @@ -1,515 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** The response for an ACI service. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("ACI") -@Fluent -public final class AciServiceResponse extends ServiceResponseBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceResponse.class); - - /* - * The container resource requirements. - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /* - * The Uri for sending scoring requests. - */ - @JsonProperty(value = "scoringUri", access = JsonProperty.Access.WRITE_ONLY) - private String scoringUri; - - /* - * The name of the Azure location/region. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Whether or not authentication is enabled on the service. - */ - @JsonProperty(value = "authEnabled") - private Boolean authEnabled; - - /* - * Whether or not SSL is enabled. - */ - @JsonProperty(value = "sslEnabled") - private Boolean sslEnabled; - - /* - * Whether or not Application Insights is enabled. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * Details of the data collection options specified. - */ - @JsonProperty(value = "dataCollection") - private AciServiceResponseDataCollection dataCollection; - - /* - * The public SSL certificate in PEM format to use if SSL is enabled. - */ - @JsonProperty(value = "sslCertificate") - private String sslCertificate; - - /* - * The public SSL key in PEM format for the certificate. - */ - @JsonProperty(value = "sslKey") - private String sslKey; - - /* - * The CName for the service. - */ - @JsonProperty(value = "cname") - private String cname; - - /* - * The public IP address for the service. - */ - @JsonProperty(value = "publicIp") - private String publicIp; - - /* - * The public Fqdn for the service. - */ - @JsonProperty(value = "publicFqdn") - private String publicFqdn; - - /* - * The Uri for sending swagger requests. - */ - @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) - private String swaggerUri; - - /* - * Details on the models and configurations. - */ - @JsonProperty(value = "modelConfigMap", access = JsonProperty.Access.WRITE_ONLY) - private Map modelConfigMap; - - /* - * The list of models. - */ - @JsonProperty(value = "models") - private List models; - - /* - * The Environment, models and assets used for inferencing. - */ - @JsonProperty(value = "environmentImageRequest") - private AciServiceResponseEnvironmentImageRequest environmentImageRequest; - - /* - * The virtual network configuration. - */ - @JsonProperty(value = "vnetConfiguration") - private AciServiceResponseVnetConfiguration vnetConfiguration; - - /* - * The encryption properties. - */ - @JsonProperty(value = "encryptionProperties") - private AciServiceResponseEncryptionProperties encryptionProperties; - - /** - * Get the containerResourceRequirements property: The container resource requirements. - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The container resource requirements. - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withContainerResourceRequirements( - ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the scoringUri property: The Uri for sending scoring requests. - * - * @return the scoringUri value. - */ - public String scoringUri() { - return this.scoringUri; - } - - /** - * Get the location property: The name of the Azure location/region. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The name of the Azure location/region. - * - * @param location the location value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the authEnabled property: Whether or not authentication is enabled on the service. - * - * @return the authEnabled value. - */ - public Boolean authEnabled() { - return this.authEnabled; - } - - /** - * Set the authEnabled property: Whether or not authentication is enabled on the service. - * - * @param authEnabled the authEnabled value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - return this; - } - - /** - * Get the sslEnabled property: Whether or not SSL is enabled. - * - * @return the sslEnabled value. - */ - public Boolean sslEnabled() { - return this.sslEnabled; - } - - /** - * Set the sslEnabled property: Whether or not SSL is enabled. - * - * @param sslEnabled the sslEnabled value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withSslEnabled(Boolean sslEnabled) { - this.sslEnabled = sslEnabled; - return this; - } - - /** - * Get the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the dataCollection property: Details of the data collection options specified. - * - * @return the dataCollection value. - */ - public AciServiceResponseDataCollection dataCollection() { - return this.dataCollection; - } - - /** - * Set the dataCollection property: Details of the data collection options specified. - * - * @param dataCollection the dataCollection value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withDataCollection(AciServiceResponseDataCollection dataCollection) { - this.dataCollection = dataCollection; - return this; - } - - /** - * Get the sslCertificate property: The public SSL certificate in PEM format to use if SSL is enabled. - * - * @return the sslCertificate value. - */ - public String sslCertificate() { - return this.sslCertificate; - } - - /** - * Set the sslCertificate property: The public SSL certificate in PEM format to use if SSL is enabled. - * - * @param sslCertificate the sslCertificate value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withSslCertificate(String sslCertificate) { - this.sslCertificate = sslCertificate; - return this; - } - - /** - * Get the sslKey property: The public SSL key in PEM format for the certificate. - * - * @return the sslKey value. - */ - public String sslKey() { - return this.sslKey; - } - - /** - * Set the sslKey property: The public SSL key in PEM format for the certificate. - * - * @param sslKey the sslKey value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withSslKey(String sslKey) { - this.sslKey = sslKey; - return this; - } - - /** - * Get the cname property: The CName for the service. - * - * @return the cname value. - */ - public String cname() { - return this.cname; - } - - /** - * Set the cname property: The CName for the service. - * - * @param cname the cname value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withCname(String cname) { - this.cname = cname; - return this; - } - - /** - * Get the publicIp property: The public IP address for the service. - * - * @return the publicIp value. - */ - public String publicIp() { - return this.publicIp; - } - - /** - * Set the publicIp property: The public IP address for the service. - * - * @param publicIp the publicIp value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withPublicIp(String publicIp) { - this.publicIp = publicIp; - return this; - } - - /** - * Get the publicFqdn property: The public Fqdn for the service. - * - * @return the publicFqdn value. - */ - public String publicFqdn() { - return this.publicFqdn; - } - - /** - * Set the publicFqdn property: The public Fqdn for the service. - * - * @param publicFqdn the publicFqdn value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withPublicFqdn(String publicFqdn) { - this.publicFqdn = publicFqdn; - return this; - } - - /** - * Get the swaggerUri property: The Uri for sending swagger requests. - * - * @return the swaggerUri value. - */ - public String swaggerUri() { - return this.swaggerUri; - } - - /** - * Get the modelConfigMap property: Details on the models and configurations. - * - * @return the modelConfigMap value. - */ - public Map modelConfigMap() { - return this.modelConfigMap; - } - - /** - * Get the models property: The list of models. - * - * @return the models value. - */ - public List models() { - return this.models; - } - - /** - * Set the models property: The list of models. - * - * @param models the models value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withModels(List models) { - this.models = models; - return this; - } - - /** - * Get the environmentImageRequest property: The Environment, models and assets used for inferencing. - * - * @return the environmentImageRequest value. - */ - public AciServiceResponseEnvironmentImageRequest environmentImageRequest() { - return this.environmentImageRequest; - } - - /** - * Set the environmentImageRequest property: The Environment, models and assets used for inferencing. - * - * @param environmentImageRequest the environmentImageRequest value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withEnvironmentImageRequest( - AciServiceResponseEnvironmentImageRequest environmentImageRequest) { - this.environmentImageRequest = environmentImageRequest; - return this; - } - - /** - * Get the vnetConfiguration property: The virtual network configuration. - * - * @return the vnetConfiguration value. - */ - public AciServiceResponseVnetConfiguration vnetConfiguration() { - return this.vnetConfiguration; - } - - /** - * Set the vnetConfiguration property: The virtual network configuration. - * - * @param vnetConfiguration the vnetConfiguration value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withVnetConfiguration(AciServiceResponseVnetConfiguration vnetConfiguration) { - this.vnetConfiguration = vnetConfiguration; - return this; - } - - /** - * Get the encryptionProperties property: The encryption properties. - * - * @return the encryptionProperties value. - */ - public AciServiceResponseEncryptionProperties encryptionProperties() { - return this.encryptionProperties; - } - - /** - * Set the encryptionProperties property: The encryption properties. - * - * @param encryptionProperties the encryptionProperties value to set. - * @return the AciServiceResponse object itself. - */ - public AciServiceResponse withEncryptionProperties(AciServiceResponseEncryptionProperties encryptionProperties) { - this.encryptionProperties = encryptionProperties; - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponse withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponse withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponse withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponse withDeploymentType(DeploymentType deploymentType) { - super.withDeploymentType(deploymentType); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - if (dataCollection() != null) { - dataCollection().validate(); - } - if (models() != null) { - models().forEach(e -> e.validate()); - } - if (environmentImageRequest() != null) { - environmentImageRequest().validate(); - } - if (vnetConfiguration() != null) { - vnetConfiguration().validate(); - } - if (encryptionProperties() != null) { - encryptionProperties().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseDataCollection.java deleted file mode 100644 index 0db27a8f5d4a..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseDataCollection.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Details of the data collection options specified. */ -@Immutable -public final class AciServiceResponseDataCollection extends ModelDataCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceResponseDataCollection.class); - - /** {@inheritDoc} */ - @Override - public AciServiceResponseDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - super.withEventHubEnabled(eventHubEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseDataCollection withStorageEnabled(Boolean storageEnabled) { - super.withStorageEnabled(storageEnabled); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEncryptionProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEncryptionProperties.java deleted file mode 100644 index 3acb1e15c472..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEncryptionProperties.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.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The encryption properties. */ -@Immutable -public final class AciServiceResponseEncryptionProperties extends EncryptionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceResponseEncryptionProperties.class); - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEncryptionProperties withVaultBaseUrl(String vaultBaseUrl) { - super.withVaultBaseUrl(vaultBaseUrl); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEncryptionProperties withKeyName(String keyName) { - super.withKeyName(keyName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEncryptionProperties withKeyVersion(String keyVersion) { - super.withKeyVersion(keyVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEnvironmentImageRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEnvironmentImageRequest.java deleted file mode 100644 index ba94417057a5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseEnvironmentImageRequest.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The Environment, models and assets used for inferencing. */ -@Immutable -public final class AciServiceResponseEnvironmentImageRequest extends EnvironmentImageResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceResponseEnvironmentImageRequest.class); - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withDriverProgram(String driverProgram) { - super.withDriverProgram(driverProgram); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withAssets(List assets) { - super.withAssets(assets); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withModelIds(List modelIds) { - super.withModelIds(modelIds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withModels(List models) { - super.withModels(models); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withEnvironment(EnvironmentImageResponseEnvironment environment) { - super.withEnvironment(environment); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseEnvironmentImageRequest withEnvironmentReference( - EnvironmentImageResponseEnvironmentReference environmentReference) { - super.withEnvironmentReference(environmentReference); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseVnetConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseVnetConfiguration.java deleted file mode 100644 index a4079908b4b6..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AciServiceResponseVnetConfiguration.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The virtual network configuration. */ -@Immutable -public final class AciServiceResponseVnetConfiguration extends VnetConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AciServiceResponseVnetConfiguration.class); - - /** {@inheritDoc} */ - @Override - public AciServiceResponseVnetConfiguration withVnetName(String vnetName) { - super.withVnetName(vnetName); - return this; - } - - /** {@inheritDoc} */ - @Override - public AciServiceResponseVnetConfiguration withSubnetName(String subnetName) { - super.withSubnetName(subnetName); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatus.java deleted file mode 100644 index 8d343511365d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatus.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.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The AksReplicaStatus model. */ -@Fluent -public class AksReplicaStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksReplicaStatus.class); - - /* - * The desired number of replicas. - */ - @JsonProperty(value = "desiredReplicas") - private Integer desiredReplicas; - - /* - * The number of updated replicas. - */ - @JsonProperty(value = "updatedReplicas") - private Integer updatedReplicas; - - /* - * The number of available replicas. - */ - @JsonProperty(value = "availableReplicas") - private Integer availableReplicas; - - /* - * The error details. - */ - @JsonProperty(value = "error") - private AksReplicaStatusError error; - - /** - * Get the desiredReplicas property: The desired number of replicas. - * - * @return the desiredReplicas value. - */ - public Integer desiredReplicas() { - return this.desiredReplicas; - } - - /** - * Set the desiredReplicas property: The desired number of replicas. - * - * @param desiredReplicas the desiredReplicas value to set. - * @return the AksReplicaStatus object itself. - */ - public AksReplicaStatus withDesiredReplicas(Integer desiredReplicas) { - this.desiredReplicas = desiredReplicas; - return this; - } - - /** - * Get the updatedReplicas property: The number of updated replicas. - * - * @return the updatedReplicas value. - */ - public Integer updatedReplicas() { - return this.updatedReplicas; - } - - /** - * Set the updatedReplicas property: The number of updated replicas. - * - * @param updatedReplicas the updatedReplicas value to set. - * @return the AksReplicaStatus object itself. - */ - public AksReplicaStatus withUpdatedReplicas(Integer updatedReplicas) { - this.updatedReplicas = updatedReplicas; - return this; - } - - /** - * Get the availableReplicas property: The number of available replicas. - * - * @return the availableReplicas value. - */ - public Integer availableReplicas() { - return this.availableReplicas; - } - - /** - * Set the availableReplicas property: The number of available replicas. - * - * @param availableReplicas the availableReplicas value to set. - * @return the AksReplicaStatus object itself. - */ - public AksReplicaStatus withAvailableReplicas(Integer availableReplicas) { - this.availableReplicas = availableReplicas; - return this; - } - - /** - * Get the error property: The error details. - * - * @return the error value. - */ - public AksReplicaStatusError error() { - return this.error; - } - - /** - * Set the error property: The error details. - * - * @param error the error value to set. - * @return the AksReplicaStatus object itself. - */ - public AksReplicaStatus withError(AksReplicaStatusError error) { - this.error = error; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatusError.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatusError.java deleted file mode 100644 index 00ca59abbc68..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksReplicaStatusError.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The error details. */ -@Immutable -public final class AksReplicaStatusError extends ManagementError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksReplicaStatusError.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequest.java deleted file mode 100644 index d5f3f4739e8d..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequest.java +++ /dev/null @@ -1,450 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The request to create an AKS service. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AKS") -@Fluent -public final class AksServiceCreateRequest extends CreateEndpointVariantRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceCreateRequest.class); - - /* - * The number of replicas on the cluster. - */ - @JsonProperty(value = "numReplicas") - private Integer numReplicas; - - /* - * Details of the data collection options specified. - */ - @JsonProperty(value = "dataCollection") - private AksServiceCreateRequestDataCollection dataCollection; - - /* - * The name of the compute resource. - */ - @JsonProperty(value = "computeName") - private String computeName; - - /* - * Whether or not Application Insights is enabled. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * The auto scaler properties. - */ - @JsonProperty(value = "autoScaler") - private AksServiceCreateRequestAutoScaler autoScaler; - - /* - * The container resource requirements. - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /* - * The maximum number of concurrent requests per container. - */ - @JsonProperty(value = "maxConcurrentRequestsPerContainer") - private Integer maxConcurrentRequestsPerContainer; - - /* - * Maximum time a request will wait in the queue (in milliseconds). After - * this time, the service will return 503 (Service Unavailable) - */ - @JsonProperty(value = "maxQueueWaitMs") - private Integer maxQueueWaitMs; - - /* - * Kubernetes namespace for the service. - */ - @JsonProperty(value = "namespace") - private String namespace; - - /* - * The scoring timeout in milliseconds. - */ - @JsonProperty(value = "scoringTimeoutMs") - private Integer scoringTimeoutMs; - - /* - * Whether or not authentication is enabled. - */ - @JsonProperty(value = "authEnabled") - private Boolean authEnabled; - - /* - * The liveness probe requirements. - */ - @JsonProperty(value = "livenessProbeRequirements") - private AksServiceCreateRequestLivenessProbeRequirements livenessProbeRequirements; - - /* - * Whether or not AAD authentication is enabled. - */ - @JsonProperty(value = "aadAuthEnabled") - private Boolean aadAuthEnabled; - - /** - * Get the numReplicas property: The number of replicas on the cluster. - * - * @return the numReplicas value. - */ - public Integer numReplicas() { - return this.numReplicas; - } - - /** - * Set the numReplicas property: The number of replicas on the cluster. - * - * @param numReplicas the numReplicas value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withNumReplicas(Integer numReplicas) { - this.numReplicas = numReplicas; - return this; - } - - /** - * Get the dataCollection property: Details of the data collection options specified. - * - * @return the dataCollection value. - */ - public AksServiceCreateRequestDataCollection dataCollection() { - return this.dataCollection; - } - - /** - * Set the dataCollection property: Details of the data collection options specified. - * - * @param dataCollection the dataCollection value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withDataCollection(AksServiceCreateRequestDataCollection dataCollection) { - this.dataCollection = dataCollection; - return this; - } - - /** - * Get the computeName property: The name of the compute resource. - * - * @return the computeName value. - */ - public String computeName() { - return this.computeName; - } - - /** - * Set the computeName property: The name of the compute resource. - * - * @param computeName the computeName value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withComputeName(String computeName) { - this.computeName = computeName; - return this; - } - - /** - * Get the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the autoScaler property: The auto scaler properties. - * - * @return the autoScaler value. - */ - public AksServiceCreateRequestAutoScaler autoScaler() { - return this.autoScaler; - } - - /** - * Set the autoScaler property: The auto scaler properties. - * - * @param autoScaler the autoScaler value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withAutoScaler(AksServiceCreateRequestAutoScaler autoScaler) { - this.autoScaler = autoScaler; - return this; - } - - /** - * Get the containerResourceRequirements property: The container resource requirements. - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The container resource requirements. - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withContainerResourceRequirements( - ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the maxConcurrentRequestsPerContainer property: The maximum number of concurrent requests per container. - * - * @return the maxConcurrentRequestsPerContainer value. - */ - public Integer maxConcurrentRequestsPerContainer() { - return this.maxConcurrentRequestsPerContainer; - } - - /** - * Set the maxConcurrentRequestsPerContainer property: The maximum number of concurrent requests per container. - * - * @param maxConcurrentRequestsPerContainer the maxConcurrentRequestsPerContainer value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withMaxConcurrentRequestsPerContainer(Integer maxConcurrentRequestsPerContainer) { - this.maxConcurrentRequestsPerContainer = maxConcurrentRequestsPerContainer; - return this; - } - - /** - * Get the maxQueueWaitMs property: Maximum time a request will wait in the queue (in milliseconds). After this - * time, the service will return 503 (Service Unavailable). - * - * @return the maxQueueWaitMs value. - */ - public Integer maxQueueWaitMs() { - return this.maxQueueWaitMs; - } - - /** - * Set the maxQueueWaitMs property: Maximum time a request will wait in the queue (in milliseconds). After this - * time, the service will return 503 (Service Unavailable). - * - * @param maxQueueWaitMs the maxQueueWaitMs value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withMaxQueueWaitMs(Integer maxQueueWaitMs) { - this.maxQueueWaitMs = maxQueueWaitMs; - return this; - } - - /** - * Get the namespace property: Kubernetes namespace for the service. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: Kubernetes namespace for the service. - * - * @param namespace the namespace value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the scoringTimeoutMs property: The scoring timeout in milliseconds. - * - * @return the scoringTimeoutMs value. - */ - public Integer scoringTimeoutMs() { - return this.scoringTimeoutMs; - } - - /** - * Set the scoringTimeoutMs property: The scoring timeout in milliseconds. - * - * @param scoringTimeoutMs the scoringTimeoutMs value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withScoringTimeoutMs(Integer scoringTimeoutMs) { - this.scoringTimeoutMs = scoringTimeoutMs; - return this; - } - - /** - * Get the authEnabled property: Whether or not authentication is enabled. - * - * @return the authEnabled value. - */ - public Boolean authEnabled() { - return this.authEnabled; - } - - /** - * Set the authEnabled property: Whether or not authentication is enabled. - * - * @param authEnabled the authEnabled value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - return this; - } - - /** - * Get the livenessProbeRequirements property: The liveness probe requirements. - * - * @return the livenessProbeRequirements value. - */ - public AksServiceCreateRequestLivenessProbeRequirements livenessProbeRequirements() { - return this.livenessProbeRequirements; - } - - /** - * Set the livenessProbeRequirements property: The liveness probe requirements. - * - * @param livenessProbeRequirements the livenessProbeRequirements value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withLivenessProbeRequirements( - AksServiceCreateRequestLivenessProbeRequirements livenessProbeRequirements) { - this.livenessProbeRequirements = livenessProbeRequirements; - return this; - } - - /** - * Get the aadAuthEnabled property: Whether or not AAD authentication is enabled. - * - * @return the aadAuthEnabled value. - */ - public Boolean aadAuthEnabled() { - return this.aadAuthEnabled; - } - - /** - * Set the aadAuthEnabled property: Whether or not AAD authentication is enabled. - * - * @param aadAuthEnabled the aadAuthEnabled value to set. - * @return the AksServiceCreateRequest object itself. - */ - public AksServiceCreateRequest withAadAuthEnabled(Boolean aadAuthEnabled) { - this.aadAuthEnabled = aadAuthEnabled; - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withIsDefault(Boolean isDefault) { - super.withIsDefault(isDefault); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withTrafficPercentile(Float trafficPercentile) { - super.withTrafficPercentile(trafficPercentile); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withType(VariantType type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withKeys(CreateServiceRequestKeys keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withEnvironmentImageRequest( - CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - super.withEnvironmentImageRequest(environmentImageRequest); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequest withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataCollection() != null) { - dataCollection().validate(); - } - if (autoScaler() != null) { - autoScaler().validate(); - } - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - if (livenessProbeRequirements() != null) { - livenessProbeRequirements().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestAutoScaler.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestAutoScaler.java deleted file mode 100644 index 64e0244a1e88..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestAutoScaler.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The auto scaler properties. */ -@Immutable -public final class AksServiceCreateRequestAutoScaler extends AutoScaler { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceCreateRequestAutoScaler.class); - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withAutoscaleEnabled(Boolean autoscaleEnabled) { - super.withAutoscaleEnabled(autoscaleEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withMinReplicas(Integer minReplicas) { - super.withMinReplicas(minReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withMaxReplicas(Integer maxReplicas) { - super.withMaxReplicas(maxReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withTargetUtilization(Integer targetUtilization) { - super.withTargetUtilization(targetUtilization); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestAutoScaler withRefreshPeriodInSeconds(Integer refreshPeriodInSeconds) { - super.withRefreshPeriodInSeconds(refreshPeriodInSeconds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestDataCollection.java deleted file mode 100644 index d5100711a66f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestDataCollection.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Details of the data collection options specified. */ -@Immutable -public final class AksServiceCreateRequestDataCollection extends ModelDataCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceCreateRequestDataCollection.class); - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - super.withEventHubEnabled(eventHubEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestDataCollection withStorageEnabled(Boolean storageEnabled) { - super.withStorageEnabled(storageEnabled); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestLivenessProbeRequirements.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestLivenessProbeRequirements.java deleted file mode 100644 index ef3774c5c72f..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceCreateRequestLivenessProbeRequirements.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.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The liveness probe requirements. */ -@Immutable -public final class AksServiceCreateRequestLivenessProbeRequirements extends LivenessProbeRequirements { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AksServiceCreateRequestLivenessProbeRequirements.class); - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withFailureThreshold(Integer failureThreshold) { - super.withFailureThreshold(failureThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withSuccessThreshold(Integer successThreshold) { - super.withSuccessThreshold(successThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withTimeoutSeconds(Integer timeoutSeconds) { - super.withTimeoutSeconds(timeoutSeconds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withPeriodSeconds(Integer periodSeconds) { - super.withPeriodSeconds(periodSeconds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceCreateRequestLivenessProbeRequirements withInitialDelaySeconds(Integer initialDelaySeconds) { - super.withInitialDelaySeconds(initialDelaySeconds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponse.java deleted file mode 100644 index 6c10e448a0dc..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponse.java +++ /dev/null @@ -1,558 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** The response for an AKS service. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AKS") -@Fluent -public final class AksServiceResponse extends AksVariantResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceResponse.class); - - /* - * The list of models. - */ - @JsonProperty(value = "models") - private List models; - - /* - * The container resource requirements. - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /* - * The maximum number of concurrent requests per container. - */ - @JsonProperty(value = "maxConcurrentRequestsPerContainer") - private Integer maxConcurrentRequestsPerContainer; - - /* - * Maximum time a request will wait in the queue (in milliseconds). After - * this time, the service will return 503 (Service Unavailable) - */ - @JsonProperty(value = "maxQueueWaitMs") - private Integer maxQueueWaitMs; - - /* - * The name of the compute resource. - */ - @JsonProperty(value = "computeName") - private String computeName; - - /* - * The Kubernetes namespace of the deployment. - */ - @JsonProperty(value = "namespace") - private String namespace; - - /* - * The number of replicas on the cluster. - */ - @JsonProperty(value = "numReplicas") - private Integer numReplicas; - - /* - * Details of the data collection options specified. - */ - @JsonProperty(value = "dataCollection") - private AksServiceResponseDataCollection dataCollection; - - /* - * Whether or not Application Insights is enabled. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * The auto scaler properties. - */ - @JsonProperty(value = "autoScaler") - private AksServiceResponseAutoScaler autoScaler; - - /* - * The Uri for sending scoring requests. - */ - @JsonProperty(value = "scoringUri", access = JsonProperty.Access.WRITE_ONLY) - private String scoringUri; - - /* - * The deployment status. - */ - @JsonProperty(value = "deploymentStatus", access = JsonProperty.Access.WRITE_ONLY) - private AksServiceResponseDeploymentStatus deploymentStatus; - - /* - * The scoring timeout in milliseconds. - */ - @JsonProperty(value = "scoringTimeoutMs") - private Integer scoringTimeoutMs; - - /* - * The liveness probe requirements. - */ - @JsonProperty(value = "livenessProbeRequirements") - private AksServiceResponseLivenessProbeRequirements livenessProbeRequirements; - - /* - * Whether or not authentication is enabled. - */ - @JsonProperty(value = "authEnabled") - private Boolean authEnabled; - - /* - * Whether or not AAD authentication is enabled. - */ - @JsonProperty(value = "aadAuthEnabled") - private Boolean aadAuthEnabled; - - /* - * The Uri for sending swagger requests. - */ - @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) - private String swaggerUri; - - /* - * Details on the models and configurations. - */ - @JsonProperty(value = "modelConfigMap", access = JsonProperty.Access.WRITE_ONLY) - private Map modelConfigMap; - - /* - * The Environment, models and assets used for inferencing. - */ - @JsonProperty(value = "environmentImageRequest") - private AksServiceResponseEnvironmentImageRequest environmentImageRequest; - - /** - * Get the models property: The list of models. - * - * @return the models value. - */ - public List models() { - return this.models; - } - - /** - * Set the models property: The list of models. - * - * @param models the models value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withModels(List models) { - this.models = models; - return this; - } - - /** - * Get the containerResourceRequirements property: The container resource requirements. - * - * @return the containerResourceRequirements value. - */ - public ContainerResourceRequirements containerResourceRequirements() { - return this.containerResourceRequirements; - } - - /** - * Set the containerResourceRequirements property: The container resource requirements. - * - * @param containerResourceRequirements the containerResourceRequirements value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withContainerResourceRequirements( - ContainerResourceRequirements containerResourceRequirements) { - this.containerResourceRequirements = containerResourceRequirements; - return this; - } - - /** - * Get the maxConcurrentRequestsPerContainer property: The maximum number of concurrent requests per container. - * - * @return the maxConcurrentRequestsPerContainer value. - */ - public Integer maxConcurrentRequestsPerContainer() { - return this.maxConcurrentRequestsPerContainer; - } - - /** - * Set the maxConcurrentRequestsPerContainer property: The maximum number of concurrent requests per container. - * - * @param maxConcurrentRequestsPerContainer the maxConcurrentRequestsPerContainer value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withMaxConcurrentRequestsPerContainer(Integer maxConcurrentRequestsPerContainer) { - this.maxConcurrentRequestsPerContainer = maxConcurrentRequestsPerContainer; - return this; - } - - /** - * Get the maxQueueWaitMs property: Maximum time a request will wait in the queue (in milliseconds). After this - * time, the service will return 503 (Service Unavailable). - * - * @return the maxQueueWaitMs value. - */ - public Integer maxQueueWaitMs() { - return this.maxQueueWaitMs; - } - - /** - * Set the maxQueueWaitMs property: Maximum time a request will wait in the queue (in milliseconds). After this - * time, the service will return 503 (Service Unavailable). - * - * @param maxQueueWaitMs the maxQueueWaitMs value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withMaxQueueWaitMs(Integer maxQueueWaitMs) { - this.maxQueueWaitMs = maxQueueWaitMs; - return this; - } - - /** - * Get the computeName property: The name of the compute resource. - * - * @return the computeName value. - */ - public String computeName() { - return this.computeName; - } - - /** - * Set the computeName property: The name of the compute resource. - * - * @param computeName the computeName value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withComputeName(String computeName) { - this.computeName = computeName; - return this; - } - - /** - * Get the namespace property: The Kubernetes namespace of the deployment. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: The Kubernetes namespace of the deployment. - * - * @param namespace the namespace value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the numReplicas property: The number of replicas on the cluster. - * - * @return the numReplicas value. - */ - public Integer numReplicas() { - return this.numReplicas; - } - - /** - * Set the numReplicas property: The number of replicas on the cluster. - * - * @param numReplicas the numReplicas value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withNumReplicas(Integer numReplicas) { - this.numReplicas = numReplicas; - return this; - } - - /** - * Get the dataCollection property: Details of the data collection options specified. - * - * @return the dataCollection value. - */ - public AksServiceResponseDataCollection dataCollection() { - return this.dataCollection; - } - - /** - * Set the dataCollection property: Details of the data collection options specified. - * - * @param dataCollection the dataCollection value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withDataCollection(AksServiceResponseDataCollection dataCollection) { - this.dataCollection = dataCollection; - return this; - } - - /** - * Get the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: Whether or not Application Insights is enabled. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the autoScaler property: The auto scaler properties. - * - * @return the autoScaler value. - */ - public AksServiceResponseAutoScaler autoScaler() { - return this.autoScaler; - } - - /** - * Set the autoScaler property: The auto scaler properties. - * - * @param autoScaler the autoScaler value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withAutoScaler(AksServiceResponseAutoScaler autoScaler) { - this.autoScaler = autoScaler; - return this; - } - - /** - * Get the scoringUri property: The Uri for sending scoring requests. - * - * @return the scoringUri value. - */ - public String scoringUri() { - return this.scoringUri; - } - - /** - * Get the deploymentStatus property: The deployment status. - * - * @return the deploymentStatus value. - */ - public AksServiceResponseDeploymentStatus deploymentStatus() { - return this.deploymentStatus; - } - - /** - * Get the scoringTimeoutMs property: The scoring timeout in milliseconds. - * - * @return the scoringTimeoutMs value. - */ - public Integer scoringTimeoutMs() { - return this.scoringTimeoutMs; - } - - /** - * Set the scoringTimeoutMs property: The scoring timeout in milliseconds. - * - * @param scoringTimeoutMs the scoringTimeoutMs value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withScoringTimeoutMs(Integer scoringTimeoutMs) { - this.scoringTimeoutMs = scoringTimeoutMs; - return this; - } - - /** - * Get the livenessProbeRequirements property: The liveness probe requirements. - * - * @return the livenessProbeRequirements value. - */ - public AksServiceResponseLivenessProbeRequirements livenessProbeRequirements() { - return this.livenessProbeRequirements; - } - - /** - * Set the livenessProbeRequirements property: The liveness probe requirements. - * - * @param livenessProbeRequirements the livenessProbeRequirements value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withLivenessProbeRequirements( - AksServiceResponseLivenessProbeRequirements livenessProbeRequirements) { - this.livenessProbeRequirements = livenessProbeRequirements; - return this; - } - - /** - * Get the authEnabled property: Whether or not authentication is enabled. - * - * @return the authEnabled value. - */ - public Boolean authEnabled() { - return this.authEnabled; - } - - /** - * Set the authEnabled property: Whether or not authentication is enabled. - * - * @param authEnabled the authEnabled value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withAuthEnabled(Boolean authEnabled) { - this.authEnabled = authEnabled; - return this; - } - - /** - * Get the aadAuthEnabled property: Whether or not AAD authentication is enabled. - * - * @return the aadAuthEnabled value. - */ - public Boolean aadAuthEnabled() { - return this.aadAuthEnabled; - } - - /** - * Set the aadAuthEnabled property: Whether or not AAD authentication is enabled. - * - * @param aadAuthEnabled the aadAuthEnabled value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withAadAuthEnabled(Boolean aadAuthEnabled) { - this.aadAuthEnabled = aadAuthEnabled; - return this; - } - - /** - * Get the swaggerUri property: The Uri for sending swagger requests. - * - * @return the swaggerUri value. - */ - public String swaggerUri() { - return this.swaggerUri; - } - - /** - * Get the modelConfigMap property: Details on the models and configurations. - * - * @return the modelConfigMap value. - */ - public Map modelConfigMap() { - return this.modelConfigMap; - } - - /** - * Get the environmentImageRequest property: The Environment, models and assets used for inferencing. - * - * @return the environmentImageRequest value. - */ - public AksServiceResponseEnvironmentImageRequest environmentImageRequest() { - return this.environmentImageRequest; - } - - /** - * Set the environmentImageRequest property: The Environment, models and assets used for inferencing. - * - * @param environmentImageRequest the environmentImageRequest value to set. - * @return the AksServiceResponse object itself. - */ - public AksServiceResponse withEnvironmentImageRequest( - AksServiceResponseEnvironmentImageRequest environmentImageRequest) { - this.environmentImageRequest = environmentImageRequest; - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withIsDefault(Boolean isDefault) { - super.withIsDefault(isDefault); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withTrafficPercentile(Float trafficPercentile) { - super.withTrafficPercentile(trafficPercentile); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withType(VariantType type) { - super.withType(type); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponse withDeploymentType(DeploymentType deploymentType) { - super.withDeploymentType(deploymentType); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (models() != null) { - models().forEach(e -> e.validate()); - } - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - if (dataCollection() != null) { - dataCollection().validate(); - } - if (autoScaler() != null) { - autoScaler().validate(); - } - if (deploymentStatus() != null) { - deploymentStatus().validate(); - } - if (livenessProbeRequirements() != null) { - livenessProbeRequirements().validate(); - } - if (environmentImageRequest() != null) { - environmentImageRequest().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseAutoScaler.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseAutoScaler.java deleted file mode 100644 index e9fe00f42a2c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseAutoScaler.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The auto scaler properties. */ -@Immutable -public final class AksServiceResponseAutoScaler extends AutoScaler { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceResponseAutoScaler.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withAutoscaleEnabled(Boolean autoscaleEnabled) { - super.withAutoscaleEnabled(autoscaleEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withMinReplicas(Integer minReplicas) { - super.withMinReplicas(minReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withMaxReplicas(Integer maxReplicas) { - super.withMaxReplicas(maxReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withTargetUtilization(Integer targetUtilization) { - super.withTargetUtilization(targetUtilization); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseAutoScaler withRefreshPeriodInSeconds(Integer refreshPeriodInSeconds) { - super.withRefreshPeriodInSeconds(refreshPeriodInSeconds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDataCollection.java deleted file mode 100644 index 0c361fd40775..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDataCollection.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Details of the data collection options specified. */ -@Immutable -public final class AksServiceResponseDataCollection extends ModelDataCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceResponseDataCollection.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - super.withEventHubEnabled(eventHubEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDataCollection withStorageEnabled(Boolean storageEnabled) { - super.withStorageEnabled(storageEnabled); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDeploymentStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDeploymentStatus.java deleted file mode 100644 index 937053855d9c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseDeploymentStatus.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The deployment status. */ -@Immutable -public final class AksServiceResponseDeploymentStatus extends AksReplicaStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceResponseDeploymentStatus.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDeploymentStatus withDesiredReplicas(Integer desiredReplicas) { - super.withDesiredReplicas(desiredReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDeploymentStatus withUpdatedReplicas(Integer updatedReplicas) { - super.withUpdatedReplicas(updatedReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDeploymentStatus withAvailableReplicas(Integer availableReplicas) { - super.withAvailableReplicas(availableReplicas); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseDeploymentStatus withError(AksReplicaStatusError error) { - super.withError(error); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseEnvironmentImageRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseEnvironmentImageRequest.java deleted file mode 100644 index b13ae06551b8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseEnvironmentImageRequest.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The Environment, models and assets used for inferencing. */ -@Immutable -public final class AksServiceResponseEnvironmentImageRequest extends EnvironmentImageResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceResponseEnvironmentImageRequest.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withDriverProgram(String driverProgram) { - super.withDriverProgram(driverProgram); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withAssets(List assets) { - super.withAssets(assets); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withModelIds(List modelIds) { - super.withModelIds(modelIds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withModels(List models) { - super.withModels(models); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withEnvironment(EnvironmentImageResponseEnvironment environment) { - super.withEnvironment(environment); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseEnvironmentImageRequest withEnvironmentReference( - EnvironmentImageResponseEnvironmentReference environmentReference) { - super.withEnvironmentReference(environmentReference); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseLivenessProbeRequirements.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseLivenessProbeRequirements.java deleted file mode 100644 index de32b17bcdd9..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksServiceResponseLivenessProbeRequirements.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The liveness probe requirements. */ -@Immutable -public final class AksServiceResponseLivenessProbeRequirements extends LivenessProbeRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksServiceResponseLivenessProbeRequirements.class); - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withFailureThreshold(Integer failureThreshold) { - super.withFailureThreshold(failureThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withSuccessThreshold(Integer successThreshold) { - super.withSuccessThreshold(successThreshold); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withTimeoutSeconds(Integer timeoutSeconds) { - super.withTimeoutSeconds(timeoutSeconds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withPeriodSeconds(Integer periodSeconds) { - super.withPeriodSeconds(periodSeconds); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksServiceResponseLivenessProbeRequirements withInitialDelaySeconds(Integer initialDelaySeconds) { - super.withInitialDelaySeconds(initialDelaySeconds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksVariantResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksVariantResponse.java deleted file mode 100644 index 077bc667c6da..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AksVariantResponse.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The response for an AKS variant. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = AksVariantResponse.class) -@JsonTypeName("Custom") -@JsonSubTypes({@JsonSubTypes.Type(name = "AKS", value = AksServiceResponse.class)}) -@Fluent -public class AksVariantResponse extends ServiceResponseBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AksVariantResponse.class); - - /* - * Is this the default variant. - */ - @JsonProperty(value = "isDefault") - private Boolean isDefault; - - /* - * The amount of traffic variant receives. - */ - @JsonProperty(value = "trafficPercentile") - private Float trafficPercentile; - - /* - * The type of the variant. - */ - @JsonProperty(value = "type") - private VariantType type; - - /** - * Get the isDefault property: Is this the default variant. - * - * @return the isDefault value. - */ - public Boolean isDefault() { - return this.isDefault; - } - - /** - * Set the isDefault property: Is this the default variant. - * - * @param isDefault the isDefault value to set. - * @return the AksVariantResponse object itself. - */ - public AksVariantResponse withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; - return this; - } - - /** - * Get the trafficPercentile property: The amount of traffic variant receives. - * - * @return the trafficPercentile value. - */ - public Float trafficPercentile() { - return this.trafficPercentile; - } - - /** - * Set the trafficPercentile property: The amount of traffic variant receives. - * - * @param trafficPercentile the trafficPercentile value to set. - * @return the AksVariantResponse object itself. - */ - public AksVariantResponse withTrafficPercentile(Float trafficPercentile) { - this.trafficPercentile = trafficPercentile; - return this; - } - - /** - * Get the type property: The type of the variant. - * - * @return the type value. - */ - public VariantType type() { - return this.type; - } - - /** - * Set the type property: The type of the variant. - * - * @param type the type value to set. - * @return the AksVariantResponse object itself. - */ - public AksVariantResponse withType(VariantType type) { - this.type = type; - return this; - } - - /** {@inheritDoc} */ - @Override - public AksVariantResponse withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksVariantResponse withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksVariantResponse withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AksVariantResponse withDeploymentType(DeploymentType deploymentType) { - super.withDeploymentType(deploymentType); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodeInformation.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodeInformation.java index eeca40fdbe0c..560f9189a747 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodeInformation.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeNodeInformation.java @@ -15,25 +15,25 @@ public final class AmlComputeNodeInformation { @JsonIgnore private final ClientLogger logger = new ClientLogger(AmlComputeNodeInformation.class); /* - * ID of the compute node. + * Node ID. ID of the compute node. */ @JsonProperty(value = "nodeId", access = JsonProperty.Access.WRITE_ONLY) private String nodeId; /* - * Private IP address of the compute node. + * Private IP address. Private IP address of the compute node. */ @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY) private String privateIpAddress; /* - * Public IP address of the compute node. + * Public IP address. Public IP address of the compute node. */ @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) private String publicIpAddress; /* - * SSH port number of the node. + * Port. SSH port number of the node. */ @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) private Integer port; @@ -46,13 +46,13 @@ public final class AmlComputeNodeInformation { private NodeState nodeState; /* - * ID of the Experiment running on the node, if any else null. + * Run ID. ID of the Experiment running on the node, if any else null. */ @JsonProperty(value = "runId", access = JsonProperty.Access.WRITE_ONLY) private String runId; /** - * Get the nodeId property: ID of the compute node. + * Get the nodeId property: Node ID. ID of the compute node. * * @return the nodeId value. */ @@ -61,7 +61,7 @@ public String nodeId() { } /** - * Get the privateIpAddress property: Private IP address of the compute node. + * Get the privateIpAddress property: Private IP address. Private IP address of the compute node. * * @return the privateIpAddress value. */ @@ -70,7 +70,7 @@ public String privateIpAddress() { } /** - * Get the publicIpAddress property: Public IP address of the compute node. + * Get the publicIpAddress property: Public IP address. Public IP address of the compute node. * * @return the publicIpAddress value. */ @@ -79,7 +79,7 @@ public String publicIpAddress() { } /** - * Get the port property: SSH port number of the node. + * Get the port property: Port. SSH port number of the node. * * @return the port value. */ @@ -98,7 +98,7 @@ public NodeState nodeState() { } /** - * Get the runId property: ID of the Experiment running on the node, if any else null. + * Get the runId property: Run ID. ID of the Experiment running on the node, if any else null. * * @return the runId value. */ diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeProperties.java index 20b05a7e6725..445ea11b9606 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeProperties.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlComputeProperties.java @@ -67,54 +67,57 @@ public final class AmlComputeProperties { private ResourceId subnet; /* - * 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 public - * nodes. It can be default only during cluster creation time, after - * creation it will be either enabled or disabled. + * 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 public nodes. It can be default only during + * cluster creation time, after creation it will be either enabled or + * disabled. */ @JsonProperty(value = "remoteLoginPortPublicAccess") private RemoteLoginPortPublicAccess remoteLoginPortPublicAccess; /* - * 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 that - * the compute is resizing; that is, compute nodes are being added to or - * removed from the compute. + * 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 that the compute is resizing; that is, compute + * nodes are being added to or removed from the compute. */ @JsonProperty(value = "allocationState", access = JsonProperty.Access.WRITE_ONLY) private AllocationState allocationState; /* - * The time at which the compute entered its current allocation state. + * Allocation state transition time. The time at which the compute entered + * its current allocation state. */ @JsonProperty(value = "allocationStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime allocationStateTransitionTime; /* - * Collection of errors encountered by various compute nodes during node - * setup. + * Errors. Collection of errors encountered by various compute nodes during + * node setup. */ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private List errors; /* - * The number of compute nodes currently assigned to the compute. + * Current node count. The number of compute nodes currently assigned to + * the compute. */ @JsonProperty(value = "currentNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer currentNodeCount; /* - * 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. + * 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. */ @JsonProperty(value = "targetNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer targetNodeCount; @@ -126,10 +129,11 @@ public final class AmlComputeProperties { private NodeStateCounts nodeStateCounts; /* - * 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. + * 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. */ @JsonProperty(value = "enableNodePublicIp") private Boolean enableNodePublicIp; @@ -297,11 +301,11 @@ public AmlComputeProperties withSubnet(ResourceId subnet) { } /** - * Get the remoteLoginPortPublicAccess property: 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 public nodes. It can be default only during cluster - * creation time, after creation it will be either enabled or disabled. + * Get the remoteLoginPortPublicAccess property: 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 public nodes. It can + * be default only during cluster creation time, after creation it will be either enabled or disabled. * * @return the remoteLoginPortPublicAccess value. */ @@ -310,11 +314,11 @@ public RemoteLoginPortPublicAccess remoteLoginPortPublicAccess() { } /** - * Set the remoteLoginPortPublicAccess property: 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 public nodes. It can be default only during cluster - * creation time, after creation it will be either enabled or disabled. + * Set the remoteLoginPortPublicAccess property: 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 public nodes. It can + * be default only during cluster creation time, after creation it will be either enabled or disabled. * * @param remoteLoginPortPublicAccess the remoteLoginPortPublicAccess value to set. * @return the AmlComputeProperties object itself. @@ -326,11 +330,11 @@ public AmlComputeProperties withRemoteLoginPortPublicAccess( } /** - * Get the allocationState property: 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 that the compute is resizing; that is, compute nodes are being - * added to or removed from the compute. + * Get the allocationState property: 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 that the compute is resizing; that is, + * compute nodes are being added to or removed from the compute. * * @return the allocationState value. */ @@ -339,8 +343,8 @@ public AllocationState allocationState() { } /** - * Get the allocationStateTransitionTime property: The time at which the compute entered its current allocation - * state. + * Get the allocationStateTransitionTime property: Allocation state transition time. The time at which the compute + * entered its current allocation state. * * @return the allocationStateTransitionTime value. */ @@ -349,7 +353,7 @@ public OffsetDateTime allocationStateTransitionTime() { } /** - * Get the errors property: Collection of errors encountered by various compute nodes during node setup. + * Get the errors property: Errors. Collection of errors encountered by various compute nodes during node setup. * * @return the errors value. */ @@ -358,7 +362,8 @@ public List 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. */ @@ -367,9 +372,9 @@ 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. */ @@ -387,9 +392,9 @@ 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. */ @@ -398,9 +403,9 @@ 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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponseBaseImageRegistry.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlToken.java similarity index 62% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponseBaseImageRegistry.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlToken.java index 260b39cac4b9..b7d2f5fd8fc4 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponseBaseImageRegistry.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AmlToken.java @@ -7,18 +7,15 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; -/** Image registry that contains the base image. */ +/** AML Token identity configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") +@JsonTypeName("AMLToken") @Immutable -public final class ModelDockerSectionResponseBaseImageRegistry extends ContainerRegistryResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelDockerSectionResponseBaseImageRegistry.class); - - /** {@inheritDoc} */ - @Override - public ModelDockerSectionResponseBaseImageRegistry withAddress(String address) { - super.withAddress(address); - return this; - } +public final class AmlToken extends IdentityConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AmlToken.class); /** * Validates the instance. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AssetReferenceBase.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AssetReferenceBase.java new file mode 100644 index 000000000000..0791ad406a79 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AssetReferenceBase.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base definition for asset references. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "referenceType", + defaultImpl = AssetReferenceBase.class) +@JsonTypeName("AssetReferenceBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "DataPath", value = DataPathAssetReference.class), + @JsonSubTypes.Type(name = "Id", value = IdAssetReference.class), + @JsonSubTypes.Type(name = "OutputPath", value = OutputPathAssetReference.class) +}) +@Immutable +public class AssetReferenceBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AssetReferenceBase.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaleSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaleSettings.java new file mode 100644 index 000000000000..969817a5c911 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaleSettings.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.Duration; + +/** The AutoScaleSettings model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scaleType") +@JsonTypeName("Auto") +@Fluent +public final class AutoScaleSettings extends OnlineScaleSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoScaleSettings.class); + + /* + * The polling interval in ISO 8691 format. Only supports duration with + * precision as low as Seconds. + */ + @JsonProperty(value = "pollingInterval") + private Duration pollingInterval; + + /* + * Target CPU usage for the autoscaler. + */ + @JsonProperty(value = "targetUtilizationPercentage") + private Integer targetUtilizationPercentage; + + /** + * 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 AutoScaleSettings object itself. + */ + public AutoScaleSettings withPollingInterval(Duration pollingInterval) { + this.pollingInterval = pollingInterval; + return this; + } + + /** + * 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. + * + * @param targetUtilizationPercentage the targetUtilizationPercentage value to set. + * @return the AutoScaleSettings object itself. + */ + public AutoScaleSettings withTargetUtilizationPercentage(Integer targetUtilizationPercentage) { + this.targetUtilizationPercentage = targetUtilizationPercentage; + return this; + } + + /** {@inheritDoc} */ + @Override + public AutoScaleSettings withMaxInstances(Integer maxInstances) { + super.withMaxInstances(maxInstances); + return this; + } + + /** {@inheritDoc} */ + @Override + public AutoScaleSettings withMinInstances(Integer minInstances) { + super.withMinInstances(minInstances); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaler.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaler.java deleted file mode 100644 index 1176762cb332..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AutoScaler.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Auto Scaler properties. */ -@Fluent -public class AutoScaler { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoScaler.class); - - /* - * Option to enable/disable auto scaling. - */ - @JsonProperty(value = "autoscaleEnabled") - private Boolean autoscaleEnabled; - - /* - * The minimum number of replicas to scale down to. - */ - @JsonProperty(value = "minReplicas") - private Integer minReplicas; - - /* - * The maximum number of replicas in the cluster. - */ - @JsonProperty(value = "maxReplicas") - private Integer maxReplicas; - - /* - * The target utilization percentage to use for determining whether to - * scale the cluster. - */ - @JsonProperty(value = "targetUtilization") - private Integer targetUtilization; - - /* - * The amount of seconds to wait between auto scale updates. - */ - @JsonProperty(value = "refreshPeriodInSeconds") - private Integer refreshPeriodInSeconds; - - /** - * Get the autoscaleEnabled property: Option to enable/disable auto scaling. - * - * @return the autoscaleEnabled value. - */ - public Boolean autoscaleEnabled() { - return this.autoscaleEnabled; - } - - /** - * Set the autoscaleEnabled property: Option to enable/disable auto scaling. - * - * @param autoscaleEnabled the autoscaleEnabled value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withAutoscaleEnabled(Boolean autoscaleEnabled) { - this.autoscaleEnabled = autoscaleEnabled; - return this; - } - - /** - * Get the minReplicas property: The minimum number of replicas to scale down to. - * - * @return the minReplicas value. - */ - public Integer minReplicas() { - return this.minReplicas; - } - - /** - * Set the minReplicas property: The minimum number of replicas to scale down to. - * - * @param minReplicas the minReplicas value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withMinReplicas(Integer minReplicas) { - this.minReplicas = minReplicas; - return this; - } - - /** - * Get the maxReplicas property: The maximum number of replicas in the cluster. - * - * @return the maxReplicas value. - */ - public Integer maxReplicas() { - return this.maxReplicas; - } - - /** - * Set the maxReplicas property: The maximum number of replicas in the cluster. - * - * @param maxReplicas the maxReplicas value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withMaxReplicas(Integer maxReplicas) { - this.maxReplicas = maxReplicas; - return this; - } - - /** - * Get the targetUtilization property: The target utilization percentage to use for determining whether to scale the - * cluster. - * - * @return the targetUtilization value. - */ - public Integer targetUtilization() { - return this.targetUtilization; - } - - /** - * Set the targetUtilization property: The target utilization percentage to use for determining whether to scale the - * cluster. - * - * @param targetUtilization the targetUtilization value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withTargetUtilization(Integer targetUtilization) { - this.targetUtilization = targetUtilization; - return this; - } - - /** - * Get the refreshPeriodInSeconds property: The amount of seconds to wait between auto scale updates. - * - * @return the refreshPeriodInSeconds value. - */ - public Integer refreshPeriodInSeconds() { - return this.refreshPeriodInSeconds; - } - - /** - * Set the refreshPeriodInSeconds property: The amount of seconds to wait between auto scale updates. - * - * @param refreshPeriodInSeconds the refreshPeriodInSeconds value to set. - * @return the AutoScaler object itself. - */ - public AutoScaler withRefreshPeriodInSeconds(Integer refreshPeriodInSeconds) { - this.refreshPeriodInSeconds = refreshPeriodInSeconds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureBlobContents.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureBlobContents.java new file mode 100644 index 000000000000..9f67f14a862f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureBlobContents.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Azure Blob datastore configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "contentsType") +@JsonTypeName("AzureBlob") +@Fluent +public final class AzureBlobContents extends DatastoreContents { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBlobContents.class); + + /* + * Storage account name. + */ + @JsonProperty(value = "accountName", required = true) + private String accountName; + + /* + * Storage account container name. + */ + @JsonProperty(value = "containerName", required = true) + private String containerName; + + /* + * Account credentials. + */ + @JsonProperty(value = "credentials", required = true) + private DatastoreCredentials credentials; + + /* + * Azure cloud endpoint for the storage account. + */ + @JsonProperty(value = "endpoint", required = true) + private String endpoint; + + /* + * Protocol used to communicate with the storage account. + */ + @JsonProperty(value = "protocol", required = true) + private String protocol; + + /** + * Get the accountName property: Storage account name. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: Storage account name. + * + * @param accountName the accountName value to set. + * @return the AzureBlobContents object itself. + */ + public AzureBlobContents withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get the containerName property: Storage account container name. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the containerName property: Storage account container name. + * + * @param containerName the containerName value to set. + * @return the AzureBlobContents object itself. + */ + public AzureBlobContents withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the credentials property: Account credentials. + * + * @return the credentials value. + */ + public DatastoreCredentials credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Account credentials. + * + * @param credentials the credentials value to set. + * @return the AzureBlobContents object itself. + */ + public AzureBlobContents withCredentials(DatastoreCredentials credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the endpoint property: Azure cloud endpoint for the storage account. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: Azure cloud endpoint for the storage account. + * + * @param endpoint the endpoint value to set. + * @return the AzureBlobContents object itself. + */ + public AzureBlobContents withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the protocol property: Protocol used to communicate with the storage account. + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Protocol used to communicate with the storage account. + * + * @param protocol the protocol value to set. + * @return the AzureBlobContents object itself. + */ + public AzureBlobContents withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (accountName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property accountName in model AzureBlobContents")); + } + if (containerName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property containerName in model AzureBlobContents")); + } + if (credentials() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property credentials in model AzureBlobContents")); + } else { + credentials().validate(); + } + if (endpoint() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property endpoint in model AzureBlobContents")); + } + if (protocol() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property protocol in model AzureBlobContents")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureDataLakeGen1Contents.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureDataLakeGen1Contents.java new file mode 100644 index 000000000000..93c9704c5801 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureDataLakeGen1Contents.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Azure Data Lake Gen1 datastore configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "contentsType") +@JsonTypeName("AzureDataLakeGen1") +@Fluent +public final class AzureDataLakeGen1Contents extends DatastoreContents { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureDataLakeGen1Contents.class); + + /* + * Account credentials. + */ + @JsonProperty(value = "credentials", required = true) + private DatastoreCredentials credentials; + + /* + * Azure Data Lake store name. + */ + @JsonProperty(value = "storeName", required = true) + private String storeName; + + /** + * Get the credentials property: Account credentials. + * + * @return the credentials value. + */ + public DatastoreCredentials credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Account credentials. + * + * @param credentials the credentials value to set. + * @return the AzureDataLakeGen1Contents object itself. + */ + public AzureDataLakeGen1Contents withCredentials(DatastoreCredentials credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the storeName property: Azure Data Lake store name. + * + * @return the storeName value. + */ + public String storeName() { + return this.storeName; + } + + /** + * Set the storeName property: Azure Data Lake store name. + * + * @param storeName the storeName value to set. + * @return the AzureDataLakeGen1Contents object itself. + */ + public AzureDataLakeGen1Contents withStoreName(String storeName) { + this.storeName = storeName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property credentials in model AzureDataLakeGen1Contents")); + } else { + credentials().validate(); + } + if (storeName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property storeName in model AzureDataLakeGen1Contents")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureDataLakeGen2Contents.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureDataLakeGen2Contents.java new file mode 100644 index 000000000000..bf950e37d70c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureDataLakeGen2Contents.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Azure Data Lake Gen2 datastore configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "contentsType") +@JsonTypeName("AzureDataLakeGen2") +@Fluent +public final class AzureDataLakeGen2Contents extends DatastoreContents { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureDataLakeGen2Contents.class); + + /* + * Storage account name. + */ + @JsonProperty(value = "accountName", required = true) + private String accountName; + + /* + * Storage account container name. + */ + @JsonProperty(value = "containerName", required = true) + private String containerName; + + /* + * Account credentials. + */ + @JsonProperty(value = "credentials", required = true) + private DatastoreCredentials credentials; + + /* + * Azure cloud endpoint for the storage account. + */ + @JsonProperty(value = "endpoint", required = true) + private String endpoint; + + /* + * Protocol used to communicate with the storage account. + */ + @JsonProperty(value = "protocol", required = true) + private String protocol; + + /** + * Get the accountName property: Storage account name. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: Storage account name. + * + * @param accountName the accountName value to set. + * @return the AzureDataLakeGen2Contents object itself. + */ + public AzureDataLakeGen2Contents withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get the containerName property: Storage account container name. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the containerName property: Storage account container name. + * + * @param containerName the containerName value to set. + * @return the AzureDataLakeGen2Contents object itself. + */ + public AzureDataLakeGen2Contents withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the credentials property: Account credentials. + * + * @return the credentials value. + */ + public DatastoreCredentials credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Account credentials. + * + * @param credentials the credentials value to set. + * @return the AzureDataLakeGen2Contents object itself. + */ + public AzureDataLakeGen2Contents withCredentials(DatastoreCredentials credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the endpoint property: Azure cloud endpoint for the storage account. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: Azure cloud endpoint for the storage account. + * + * @param endpoint the endpoint value to set. + * @return the AzureDataLakeGen2Contents object itself. + */ + public AzureDataLakeGen2Contents withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the protocol property: Protocol used to communicate with the storage account. + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Protocol used to communicate with the storage account. + * + * @param protocol the protocol value to set. + * @return the AzureDataLakeGen2Contents object itself. + */ + public AzureDataLakeGen2Contents withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (accountName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property accountName in model AzureDataLakeGen2Contents")); + } + if (containerName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property containerName in model AzureDataLakeGen2Contents")); + } + if (credentials() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property credentials in model AzureDataLakeGen2Contents")); + } else { + credentials().validate(); + } + if (endpoint() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property endpoint in model AzureDataLakeGen2Contents")); + } + if (protocol() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property protocol in model AzureDataLakeGen2Contents")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureFileContents.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureFileContents.java new file mode 100644 index 000000000000..3cfb09e020b1 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureFileContents.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Azure File datastore configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "contentsType") +@JsonTypeName("AzureFile") +@Fluent +public final class AzureFileContents extends DatastoreContents { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureFileContents.class); + + /* + * Storage account name. + */ + @JsonProperty(value = "accountName", required = true) + private String accountName; + + /* + * Storage account container name. + */ + @JsonProperty(value = "containerName", required = true) + private String containerName; + + /* + * Account credentials. + */ + @JsonProperty(value = "credentials", required = true) + private DatastoreCredentials credentials; + + /* + * Azure cloud endpoint for the storage account. + */ + @JsonProperty(value = "endpoint", required = true) + private String endpoint; + + /* + * Protocol used to communicate with the storage account. + */ + @JsonProperty(value = "protocol", required = true) + private String protocol; + + /** + * Get the accountName property: Storage account name. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: Storage account name. + * + * @param accountName the accountName value to set. + * @return the AzureFileContents object itself. + */ + public AzureFileContents withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get the containerName property: Storage account container name. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the containerName property: Storage account container name. + * + * @param containerName the containerName value to set. + * @return the AzureFileContents object itself. + */ + public AzureFileContents withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the credentials property: Account credentials. + * + * @return the credentials value. + */ + public DatastoreCredentials credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Account credentials. + * + * @param credentials the credentials value to set. + * @return the AzureFileContents object itself. + */ + public AzureFileContents withCredentials(DatastoreCredentials credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the endpoint property: Azure cloud endpoint for the storage account. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: Azure cloud endpoint for the storage account. + * + * @param endpoint the endpoint value to set. + * @return the AzureFileContents object itself. + */ + public AzureFileContents withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the protocol property: Protocol used to communicate with the storage account. + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Protocol used to communicate with the storage account. + * + * @param protocol the protocol value to set. + * @return the AzureFileContents object itself. + */ + public AzureFileContents withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (accountName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property accountName in model AzureFileContents")); + } + if (containerName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property containerName in model AzureFileContents")); + } + if (credentials() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property credentials in model AzureFileContents")); + } else { + credentials().validate(); + } + if (endpoint() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property endpoint in model AzureFileContents")); + } + if (protocol() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property protocol in model AzureFileContents")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzurePostgreSqlContents.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzurePostgreSqlContents.java new file mode 100644 index 000000000000..3ceba1cc0b88 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzurePostgreSqlContents.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Azure Postgre SQL datastore configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "contentsType") +@JsonTypeName("AzurePostgreSql") +@Fluent +public final class AzurePostgreSqlContents extends DatastoreContents { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzurePostgreSqlContents.class); + + /* + * Account credentials. + */ + @JsonProperty(value = "credentials", required = true) + private DatastoreCredentials credentials; + + /* + * Azure SQL database name. + */ + @JsonProperty(value = "databaseName", required = true) + private String databaseName; + + /* + * Whether the Azure PostgreSQL server requires SSL. + */ + @JsonProperty(value = "enableSSL") + private Boolean enableSsl; + + /* + * Azure cloud endpoint for the database. + */ + @JsonProperty(value = "endpoint", required = true) + private String endpoint; + + /* + * Azure SQL server port. + */ + @JsonProperty(value = "portNumber", required = true) + private int portNumber; + + /* + * Azure SQL server name. + */ + @JsonProperty(value = "serverName", required = true) + private String serverName; + + /** + * Get the credentials property: Account credentials. + * + * @return the credentials value. + */ + public DatastoreCredentials credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Account credentials. + * + * @param credentials the credentials value to set. + * @return the AzurePostgreSqlContents object itself. + */ + public AzurePostgreSqlContents withCredentials(DatastoreCredentials credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the databaseName property: Azure SQL database name. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the databaseName property: Azure SQL database name. + * + * @param databaseName the databaseName value to set. + * @return the AzurePostgreSqlContents object itself. + */ + public AzurePostgreSqlContents withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the enableSsl property: Whether the Azure PostgreSQL server requires SSL. + * + * @return the enableSsl value. + */ + public Boolean enableSsl() { + return this.enableSsl; + } + + /** + * Set the enableSsl property: Whether the Azure PostgreSQL server requires SSL. + * + * @param enableSsl the enableSsl value to set. + * @return the AzurePostgreSqlContents object itself. + */ + public AzurePostgreSqlContents withEnableSsl(Boolean enableSsl) { + this.enableSsl = enableSsl; + return this; + } + + /** + * Get the endpoint property: Azure cloud endpoint for the database. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: Azure cloud endpoint for the database. + * + * @param endpoint the endpoint value to set. + * @return the AzurePostgreSqlContents object itself. + */ + public AzurePostgreSqlContents withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the portNumber property: Azure SQL server port. + * + * @return the portNumber value. + */ + public int portNumber() { + return this.portNumber; + } + + /** + * Set the portNumber property: Azure SQL server port. + * + * @param portNumber the portNumber value to set. + * @return the AzurePostgreSqlContents object itself. + */ + public AzurePostgreSqlContents withPortNumber(int portNumber) { + this.portNumber = portNumber; + return this; + } + + /** + * Get the serverName property: Azure SQL server name. + * + * @return the serverName value. + */ + public String serverName() { + return this.serverName; + } + + /** + * Set the serverName property: Azure SQL server name. + * + * @param serverName the serverName value to set. + * @return the AzurePostgreSqlContents object itself. + */ + public AzurePostgreSqlContents withServerName(String serverName) { + this.serverName = serverName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property credentials in model AzurePostgreSqlContents")); + } else { + credentials().validate(); + } + if (databaseName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property databaseName in model AzurePostgreSqlContents")); + } + if (endpoint() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property endpoint in model AzurePostgreSqlContents")); + } + if (serverName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property serverName in model AzurePostgreSqlContents")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureSqlDatabaseContents.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureSqlDatabaseContents.java new file mode 100644 index 000000000000..f79aa4474582 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/AzureSqlDatabaseContents.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Azure SQL Database datastore configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "contentsType") +@JsonTypeName("AzureSqlDatabase") +@Fluent +public final class AzureSqlDatabaseContents extends DatastoreContents { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureSqlDatabaseContents.class); + + /* + * Account credentials. + */ + @JsonProperty(value = "credentials", required = true) + private DatastoreCredentials credentials; + + /* + * Azure SQL database name. + */ + @JsonProperty(value = "databaseName", required = true) + private String databaseName; + + /* + * Azure cloud endpoint for the database. + */ + @JsonProperty(value = "endpoint", required = true) + private String endpoint; + + /* + * Azure SQL server port. + */ + @JsonProperty(value = "portNumber", required = true) + private int portNumber; + + /* + * Azure SQL server name. + */ + @JsonProperty(value = "serverName", required = true) + private String serverName; + + /** + * Get the credentials property: Account credentials. + * + * @return the credentials value. + */ + public DatastoreCredentials credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Account credentials. + * + * @param credentials the credentials value to set. + * @return the AzureSqlDatabaseContents object itself. + */ + public AzureSqlDatabaseContents withCredentials(DatastoreCredentials credentials) { + this.credentials = credentials; + return this; + } + + /** + * Get the databaseName property: Azure SQL database name. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the databaseName property: Azure SQL database name. + * + * @param databaseName the databaseName value to set. + * @return the AzureSqlDatabaseContents object itself. + */ + public AzureSqlDatabaseContents withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the endpoint property: Azure cloud endpoint for the database. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: Azure cloud endpoint for the database. + * + * @param endpoint the endpoint value to set. + * @return the AzureSqlDatabaseContents object itself. + */ + public AzureSqlDatabaseContents withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the portNumber property: Azure SQL server port. + * + * @return the portNumber value. + */ + public int portNumber() { + return this.portNumber; + } + + /** + * Set the portNumber property: Azure SQL server port. + * + * @param portNumber the portNumber value to set. + * @return the AzureSqlDatabaseContents object itself. + */ + public AzureSqlDatabaseContents withPortNumber(int portNumber) { + this.portNumber = portNumber; + return this; + } + + /** + * Get the serverName property: Azure SQL server name. + * + * @return the serverName value. + */ + public String serverName() { + return this.serverName; + } + + /** + * Set the serverName property: Azure SQL server name. + * + * @param serverName the serverName value to set. + * @return the AzureSqlDatabaseContents object itself. + */ + public AzureSqlDatabaseContents withServerName(String serverName) { + this.serverName = serverName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property credentials in model AzureSqlDatabaseContents")); + } else { + credentials().validate(); + } + if (databaseName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property databaseName in model AzureSqlDatabaseContents")); + } + if (endpoint() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property endpoint in model AzureSqlDatabaseContents")); + } + if (serverName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property serverName in model AzureSqlDatabaseContents")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BanditPolicy.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BanditPolicy.java new file mode 100644 index 000000000000..03e007adc6d9 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BanditPolicy.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") +@JsonTypeName("Bandit") +@Fluent +public final class BanditPolicy extends EarlyTerminationPolicy { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BanditPolicy.class); + + /* + * Absolute distance allowed from the best performing run. + */ + @JsonProperty(value = "slackAmount") + private Float slackAmount; + + /* + * Ratio of the allowed distance from the best performing run. + */ + @JsonProperty(value = "slackFactor") + private Float slackFactor; + + /** + * Get the slackAmount property: Absolute distance allowed from the best performing run. + * + * @return the slackAmount value. + */ + public Float slackAmount() { + return this.slackAmount; + } + + /** + * Set the slackAmount property: Absolute distance allowed from the best performing run. + * + * @param slackAmount the slackAmount value to set. + * @return the BanditPolicy object itself. + */ + public BanditPolicy withSlackAmount(Float slackAmount) { + this.slackAmount = slackAmount; + return this; + } + + /** + * Get the slackFactor property: Ratio of the allowed distance from the best performing run. + * + * @return the slackFactor value. + */ + public Float slackFactor() { + return this.slackFactor; + } + + /** + * Set the slackFactor property: Ratio of the allowed distance from the best performing run. + * + * @param slackFactor the slackFactor value to set. + * @return the BanditPolicy object itself. + */ + public BanditPolicy withSlackFactor(Float slackFactor) { + this.slackFactor = slackFactor; + return this; + } + + /** {@inheritDoc} */ + @Override + public BanditPolicy withDelayEvaluation(Integer delayEvaluation) { + super.withDelayEvaluation(delayEvaluation); + return this; + } + + /** {@inheritDoc} */ + @Override + public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BaseComputeResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BaseComputeResource.java new file mode 100644 index 000000000000..0b05be553b92 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BaseComputeResource.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The BaseComputeResource model. */ +@Fluent +public class BaseComputeResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BaseComputeResource.class); + + /* + * Compute properties + */ + @JsonProperty(value = "properties") + private Compute properties; + + /** + * 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 BaseComputeResource object itself. + */ + public BaseComputeResource 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(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeployment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeployment.java new file mode 100644 index 000000000000..768d97b2f78a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeployment.java @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Batch inference settings per deployment. */ +@Fluent +public final class BatchDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchDeployment.class); + + /* + * Code configuration for the endpoint deployment. + */ + @JsonProperty(value = "codeConfiguration") + private CodeConfiguration codeConfiguration; + + /* + * Configuration for compute binding. + */ + @JsonProperty(value = "compute") + private ComputeConfiguration compute; + + /* + * Description of the endpoint deployment. + */ + @JsonProperty(value = "description") + private String description; + + /* + * ARM resource ID of the environment specification for the endpoint + * deployment. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * Environment variables configuration for the deployment. + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Error threshold, if the error count for the entire input goes above this + * value, + * the batch inference will be aborted. Range is [-1, int.MaxValue]. + * For FileDataset, this value is the count of file failures. + * For TabularDataset, this value is the count of record failures. + * If set to -1 (the lower bound), all failures during batch inference will + * be ignored. + */ + @JsonProperty(value = "errorThreshold") + private Integer errorThreshold; + + /* + * Logging level for batch inference operation. + */ + @JsonProperty(value = "loggingLevel") + private BatchLoggingLevel loggingLevel; + + /* + * 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. + */ + @JsonProperty(value = "miniBatchSize") + private Long miniBatchSize; + + /* + * Reference to the model asset for the endpoint deployment. + */ + @JsonProperty(value = "model") + private AssetReferenceBase model; + + /* + * Output configuration for the batch inference operation. + */ + @JsonProperty(value = "outputConfiguration") + private BatchOutputConfiguration outputConfiguration; + + /* + * Partition keys list used for Named partitioning. + */ + @JsonProperty(value = "partitionKeys") + private List partitionKeys; + + /* + * Property dictionary. Properties can be added, but not removed or + * altered. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Retry Settings for the batch inference operation. + */ + @JsonProperty(value = "retrySettings") + private BatchRetrySettings retrySettings; + + /** + * Get the codeConfiguration property: Code configuration for the endpoint deployment. + * + * @return the codeConfiguration value. + */ + public CodeConfiguration codeConfiguration() { + return this.codeConfiguration; + } + + /** + * Set the codeConfiguration property: Code configuration for the endpoint deployment. + * + * @param codeConfiguration the codeConfiguration value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { + this.codeConfiguration = codeConfiguration; + return this; + } + + /** + * Get the compute property: Configuration for compute binding. + * + * @return the compute value. + */ + public ComputeConfiguration compute() { + return this.compute; + } + + /** + * Set the compute property: Configuration for compute binding. + * + * @param compute the compute value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withCompute(ComputeConfiguration compute) { + this.compute = compute; + return this; + } + + /** + * Get the description property: Description of the endpoint deployment. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the endpoint deployment. + * + * @param description the description value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the environmentId property: ARM resource ID of the environment specification for the endpoint deployment. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: ARM resource ID of the environment specification for the endpoint deployment. + * + * @param environmentId the environmentId value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the environmentVariables property: Environment variables configuration for the deployment. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment variables configuration for the deployment. + * + * @param environmentVariables the environmentVariables value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, + * the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of + * file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), + * all failures during batch inference will be ignored. + * + * @return the errorThreshold value. + */ + public Integer errorThreshold() { + return this.errorThreshold; + } + + /** + * Set the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, + * the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of + * file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), + * all failures during batch inference will be ignored. + * + * @param errorThreshold the errorThreshold value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withErrorThreshold(Integer errorThreshold) { + this.errorThreshold = errorThreshold; + return this; + } + + /** + * Get the loggingLevel property: Logging level for batch inference operation. + * + * @return the loggingLevel value. + */ + public BatchLoggingLevel loggingLevel() { + return this.loggingLevel; + } + + /** + * Set the loggingLevel property: Logging level for batch inference operation. + * + * @param loggingLevel the loggingLevel value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment 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. + * + * @return the miniBatchSize value. + */ + public Long miniBatchSize() { + return this.miniBatchSize; + } + + /** + * 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 miniBatchSize the miniBatchSize value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withMiniBatchSize(Long miniBatchSize) { + this.miniBatchSize = miniBatchSize; + return this; + } + + /** + * Get the model property: Reference to the model asset for the endpoint deployment. + * + * @return the model value. + */ + public AssetReferenceBase model() { + return this.model; + } + + /** + * Set the model property: Reference to the model asset for the endpoint deployment. + * + * @param model the model value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withModel(AssetReferenceBase model) { + this.model = model; + return this; + } + + /** + * Get the outputConfiguration property: Output configuration for the batch inference operation. + * + * @return the outputConfiguration value. + */ + public BatchOutputConfiguration outputConfiguration() { + return this.outputConfiguration; + } + + /** + * Set the outputConfiguration property: Output configuration for the batch inference operation. + * + * @param outputConfiguration the outputConfiguration value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withOutputConfiguration(BatchOutputConfiguration outputConfiguration) { + this.outputConfiguration = outputConfiguration; + return this; + } + + /** + * Get the partitionKeys property: Partition keys list used for Named partitioning. + * + * @return the partitionKeys value. + */ + public List partitionKeys() { + return this.partitionKeys; + } + + /** + * Set the partitionKeys property: Partition keys list used for Named partitioning. + * + * @param partitionKeys the partitionKeys value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withPartitionKeys(List partitionKeys) { + this.partitionKeys = partitionKeys; + return this; + } + + /** + * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. + * + * @return the properties value. + */ + public Map 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 BatchDeployment object itself. + */ + public BatchDeployment withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the retrySettings property: Retry Settings for the batch inference operation. + * + * @return the retrySettings value. + */ + public BatchRetrySettings retrySettings() { + return this.retrySettings; + } + + /** + * Set the retrySettings property: Retry Settings for the batch inference operation. + * + * @param retrySettings the retrySettings value to set. + * @return the BatchDeployment object itself. + */ + public BatchDeployment withRetrySettings(BatchRetrySettings retrySettings) { + this.retrySettings = retrySettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (codeConfiguration() != null) { + codeConfiguration().validate(); + } + if (compute() != null) { + compute().validate(); + } + if (model() != null) { + model().validate(); + } + if (outputConfiguration() != null) { + outputConfiguration().validate(); + } + if (retrySettings() != null) { + retrySettings().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeploymentTrackedResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeploymentTrackedResource.java new file mode 100644 index 000000000000..0d956c2726ad --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeploymentTrackedResource.java @@ -0,0 +1,293 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchDeploymentTrackedResourceInner; +import java.util.Map; + +/** An immutable client-side representation of BatchDeploymentTrackedResource. */ +public interface BatchDeploymentTrackedResource { + /** + * 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 identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + ResourceIdentity 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 properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + BatchDeployment properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner + * com.azure.resourcemanager.machinelearningservices.fluent.models.BatchDeploymentTrackedResourceInner object. + * + * @return the inner object. + */ + BatchDeploymentTrackedResourceInner innerModel(); + + /** The entirety of the BatchDeploymentTrackedResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The BatchDeploymentTrackedResource definition stages. */ + interface DefinitionStages { + /** The first stage of the BatchDeploymentTrackedResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the BatchDeploymentTrackedResource 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 BatchDeploymentTrackedResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies endpointName, resourceGroupName, workspaceName. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingBatchEndpoint( + String endpointName, String resourceGroupName, String workspaceName); + } + /** The stage of the BatchDeploymentTrackedResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(BatchDeployment properties); + } + /** + * The stage of the BatchDeploymentTrackedResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + BatchDeploymentTrackedResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BatchDeploymentTrackedResource create(Context context); + } + /** The stage of the BatchDeploymentTrackedResource 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 BatchDeploymentTrackedResource definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Service identity associated with a resource.. + * + * @param identity Service identity associated with a resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ResourceIdentity identity); + } + /** The stage of the BatchDeploymentTrackedResource 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); + } + } + /** + * Begins update for the BatchDeploymentTrackedResource resource. + * + * @return the stage of resource update. + */ + BatchDeploymentTrackedResource.Update update(); + + /** The template for BatchDeploymentTrackedResource update. */ + interface Update + extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BatchDeploymentTrackedResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BatchDeploymentTrackedResource apply(Context context); + } + /** The BatchDeploymentTrackedResource update stages. */ + interface UpdateStages { + /** The stage of the BatchDeploymentTrackedResource 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 BatchDeploymentTrackedResource update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Service identity associated with a resource.. + * + * @param identity Service identity associated with a resource. + * @return the next definition stage. + */ + Update withIdentity(ResourceIdentity identity); + } + /** The stage of the BatchDeploymentTrackedResource 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 BatchDeploymentTrackedResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(PartialBatchDeployment properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BatchDeploymentTrackedResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BatchDeploymentTrackedResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeploymentTrackedResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeploymentTrackedResourceArmPaginatedResult.java new file mode 100644 index 000000000000..7f5000fb2aa5 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeploymentTrackedResourceArmPaginatedResult.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchDeploymentTrackedResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of BatchDeployment entities. */ +@Fluent +public final class BatchDeploymentTrackedResourceArmPaginatedResult { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(BatchDeploymentTrackedResourceArmPaginatedResult.class); + + /* + * The link to the next page of BatchDeployment objects. If null, there are + * no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type BatchDeployment. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of BatchDeployment 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 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; + } + + /** + * Get the value property: An array of objects of type BatchDeployment. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeployments.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeployments.java new file mode 100644 index 000000000000..a9eb1040cf92 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchDeployments.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 BatchDeployments. */ +public interface BatchDeployments { + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint 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 BatchDeployment entities. + */ + PagedIterable list( + String endpointName, String resourceGroupName, String workspaceName); + + /** + * Lists Batch inference deployments in the workspace. + * + * @param endpointName Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + PagedIterable list( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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 delete(String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Delete Batch Inference deployment. + * + * @param endpointName Endpoint name. + * @param deploymentName Inference deployment identifier. + * @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. + */ + Response deleteWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 batch inference deployment by id. + */ + BatchDeploymentTrackedResource get( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Gets a batch inference deployment by id. + * + * @param endpointName Endpoint name. + * @param deploymentName The identifier for the Batch deployments. + * @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 a batch inference deployment by id. + */ + Response getWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * 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. + */ + BatchDeploymentTrackedResource getById(String id); + + /** + * Gets a batch inference deployment by id. + * + * @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 a batch inference deployment by id. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete Batch Inference deployment. + * + * @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 Batch Inference deployment. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new BatchDeploymentTrackedResource resource. + * + * @param name resource name. + * @return the first stage of the new BatchDeploymentTrackedResource definition. + */ + BatchDeploymentTrackedResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpoint.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpoint.java new file mode 100644 index 000000000000..e7ad80069d4a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpoint.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointInner; +import java.util.Map; + +/** An immutable client-side representation of BatchEndpoint. */ +public interface BatchEndpoint { + /** + * Gets the authMode property: Enum to determine endpoint authentication mode. + * + * @return the authMode value. + */ + EndpointAuthMode authMode(); + + /** + * Gets the description property: Description of the inference endpoint. + * + * @return the description value. + */ + 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. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the scoringUri property: Endpoint URI. + * + * @return the scoringUri value. + */ + String scoringUri(); + + /** + * Gets the swaggerUri property: Endpoint Swagger URI. + * + * @return the swaggerUri value. + */ + String swaggerUri(); + + /** + * Gets the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @return the traffic value. + */ + Map traffic(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointInner object. + * + * @return the inner object. + */ + BatchEndpointInner innerModel(); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpointTrackedResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpointTrackedResource.java new file mode 100644 index 000000000000..15811f26d67c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpointTrackedResource.java @@ -0,0 +1,313 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.BatchEndpointInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointTrackedResourceInner; +import java.util.Map; + +/** An immutable client-side representation of BatchEndpointTrackedResource. */ +public interface BatchEndpointTrackedResource { + /** + * 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 identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + ResourceIdentity 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 properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + BatchEndpoint properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointTrackedResourceInner + * object. + * + * @return the inner object. + */ + BatchEndpointTrackedResourceInner innerModel(); + + /** The entirety of the BatchEndpointTrackedResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The BatchEndpointTrackedResource definition stages. */ + interface DefinitionStages { + /** The first stage of the BatchEndpointTrackedResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the BatchEndpointTrackedResource 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 BatchEndpointTrackedResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the BatchEndpointTrackedResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(BatchEndpointInner properties); + } + /** + * The stage of the BatchEndpointTrackedResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + BatchEndpointTrackedResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BatchEndpointTrackedResource create(Context context); + } + /** The stage of the BatchEndpointTrackedResource 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 BatchEndpointTrackedResource definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Service identity associated with a resource.. + * + * @param identity Service identity associated with a resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ResourceIdentity identity); + } + /** The stage of the BatchEndpointTrackedResource 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); + } + } + /** + * Begins update for the BatchEndpointTrackedResource resource. + * + * @return the stage of resource update. + */ + BatchEndpointTrackedResource.Update update(); + + /** The template for BatchEndpointTrackedResource update. */ + interface Update + extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BatchEndpointTrackedResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BatchEndpointTrackedResource apply(Context context); + } + /** The BatchEndpointTrackedResource update stages. */ + interface UpdateStages { + /** The stage of the BatchEndpointTrackedResource 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 BatchEndpointTrackedResource update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Service identity associated with a resource.. + * + * @param identity Service identity associated with a resource. + * @return the next definition stage. + */ + Update withIdentity(ResourceIdentity identity); + } + /** The stage of the BatchEndpointTrackedResource 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 BatchEndpointTrackedResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(PartialBatchEndpoint properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BatchEndpointTrackedResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BatchEndpointTrackedResource refresh(Context context); + + /** + * Lists batch Inference Endpoint keys. + * + * @throws com.azure.core.management.exception.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. + */ + EndpointAuthKeys listKeys(); + + /** + * Lists batch Inference Endpoint keys. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + Response listKeysWithResponse(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpointTrackedResourceArmPaginatedResult.java new file mode 100644 index 000000000000..0c26a7ae6e34 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpointTrackedResourceArmPaginatedResult.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.BatchEndpointTrackedResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of BatchEndpoint entities. */ +@Fluent +public final class BatchEndpointTrackedResourceArmPaginatedResult { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(BatchEndpointTrackedResourceArmPaginatedResult.class); + + /* + * The link to the next page of BatchEndpoint objects. If null, there are + * no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type BatchEndpoint. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of BatchEndpoint 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 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; + } + + /** + * Get the value property: An array of objects of type BatchEndpoint. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpoints.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpoints.java new file mode 100644 index 000000000000..a1d0349a0809 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchEndpoints.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 BatchEndpoints. */ +public interface BatchEndpoints { + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + 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 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, Integer count, String skip, Context context); + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint 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. + */ + void delete(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Delete Batch Inference Endpoint. + * + * @param endpointName Inference Endpoint name. + * @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. + */ + Response deleteWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 batch inference endpoint by name. + */ + BatchEndpointTrackedResource get(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Gets a batch inference endpoint by name. + * + * @param endpointName Name for the Batch Endpoint. + * @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 a batch inference endpoint by name. + */ + Response getWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint 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 keys for endpoint authentication. + */ + EndpointAuthKeys listKeys(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Lists batch Inference Endpoint keys. + * + * @param endpointName Inference Endpoint name. + * @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 keys for endpoint authentication. + */ + Response listKeysWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * 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. + */ + BatchEndpointTrackedResource getById(String id); + + /** + * Gets a batch inference endpoint 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 a batch inference endpoint by name. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete Batch Inference Endpoint. + * + * @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 Batch Inference Endpoint. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new BatchEndpointTrackedResource resource. + * + * @param name resource name. + * @return the first stage of the new BatchEndpointTrackedResource definition. + */ + BatchEndpointTrackedResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchLoggingLevel.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchLoggingLevel.java new file mode 100644 index 000000000000..bc5789d72227 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchLoggingLevel.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for BatchLoggingLevel. */ +public final class BatchLoggingLevel extends ExpandableStringEnum { + /** Static value Info for BatchLoggingLevel. */ + public static final BatchLoggingLevel INFO = fromString("Info"); + + /** Static value Warning for BatchLoggingLevel. */ + public static final BatchLoggingLevel WARNING = fromString("Warning"); + + /** Static value Debug for BatchLoggingLevel. */ + public static final BatchLoggingLevel DEBUG = fromString("Debug"); + + /** + * Creates or finds a BatchLoggingLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding BatchLoggingLevel. + */ + @JsonCreator + public static BatchLoggingLevel fromString(String name) { + return fromString(name, BatchLoggingLevel.class); + } + + /** @return known BatchLoggingLevel values. */ + public static Collection values() { + return values(BatchLoggingLevel.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchOutputAction.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchOutputAction.java new file mode 100644 index 000000000000..5c7c156399a6 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchOutputAction.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for BatchOutputAction. */ +public final class BatchOutputAction extends ExpandableStringEnum { + /** Static value SummaryOnly for BatchOutputAction. */ + public static final BatchOutputAction SUMMARY_ONLY = fromString("SummaryOnly"); + + /** Static value AppendRow for BatchOutputAction. */ + public static final BatchOutputAction APPEND_ROW = fromString("AppendRow"); + + /** + * Creates or finds a BatchOutputAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding BatchOutputAction. + */ + @JsonCreator + public static BatchOutputAction fromString(String name) { + return fromString(name, BatchOutputAction.class); + } + + /** @return known BatchOutputAction values. */ + public static Collection values() { + return values(BatchOutputAction.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchOutputConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchOutputConfiguration.java new file mode 100644 index 000000000000..c8389b12d682 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchOutputConfiguration.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Batch inference output configuration. */ +@Fluent +public final class BatchOutputConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchOutputConfiguration.class); + + /* + * Customized output file name for append_row output action. + */ + @JsonProperty(value = "appendRowFileName") + private String appendRowFileName; + + /* + * Indicates how the output will be organized. + */ + @JsonProperty(value = "outputAction") + private BatchOutputAction outputAction; + + /** + * Get the appendRowFileName property: Customized output file name for append_row output action. + * + * @return the appendRowFileName value. + */ + public String appendRowFileName() { + return this.appendRowFileName; + } + + /** + * Set the appendRowFileName property: Customized output file name for append_row output action. + * + * @param appendRowFileName the appendRowFileName value to set. + * @return the BatchOutputConfiguration object itself. + */ + public BatchOutputConfiguration withAppendRowFileName(String appendRowFileName) { + this.appendRowFileName = appendRowFileName; + return this; + } + + /** + * Get the outputAction property: Indicates how the output will be organized. + * + * @return the outputAction value. + */ + public BatchOutputAction outputAction() { + return this.outputAction; + } + + /** + * Set the outputAction property: Indicates how the output will be organized. + * + * @param outputAction the outputAction value to set. + * @return the BatchOutputConfiguration object itself. + */ + public BatchOutputConfiguration withOutputAction(BatchOutputAction outputAction) { + this.outputAction = outputAction; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchRetrySettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchRetrySettings.java new file mode 100644 index 000000000000..2cb02bbb094e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/BatchRetrySettings.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** Retry settings for a batch inference operation. */ +@Fluent +public final class BatchRetrySettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BatchRetrySettings.class); + + /* + * Maximum retry count for a mini-batch + */ + @JsonProperty(value = "maxRetries") + private Integer maxRetries; + + /* + * Invocation timeout for a mini-batch, in ISO 8601 format. + */ + @JsonProperty(value = "timeout") + private Duration timeout; + + /** + * Get the maxRetries property: Maximum retry count for a mini-batch. + * + * @return the maxRetries value. + */ + public Integer maxRetries() { + return this.maxRetries; + } + + /** + * Set the maxRetries property: Maximum retry count for a mini-batch. + * + * @param maxRetries the maxRetries value to set. + * @return the BatchRetrySettings object itself. + */ + public BatchRetrySettings withMaxRetries(Integer maxRetries) { + this.maxRetries = maxRetries; + return this; + } + + /** + * Get the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. + * + * @return the timeout value. + */ + public Duration timeout() { + return this.timeout; + } + + /** + * Set the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. + * + * @param timeout the timeout value to set. + * @return the BatchRetrySettings object itself. + */ + public BatchRetrySettings withTimeout(Duration timeout) { + this.timeout = timeout; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CertificateDatastoreCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CertificateDatastoreCredentials.java new file mode 100644 index 000000000000..4ba9e15850aa --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CertificateDatastoreCredentials.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.UUID; + +/** Certificate datastore credentials configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") +@JsonTypeName("Certificate") +@Fluent +public final class CertificateDatastoreCredentials extends DatastoreCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateDatastoreCredentials.class); + + /* + * Authority URL used for authentication. + */ + @JsonProperty(value = "authorityUrl") + private String authorityUrl; + + /* + * Service principal client ID. + */ + @JsonProperty(value = "clientId", required = true) + private UUID clientId; + + /* + * Resource the service principal has access to. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * Service principal secrets. + */ + @JsonProperty(value = "secrets") + private CertificateDatastoreSecrets secrets; + + /* + * ID of the tenant to which the service principal belongs. + */ + @JsonProperty(value = "tenantId", required = true) + private UUID tenantId; + + /* + * Thumbprint of the certificate used for authentication. + */ + @JsonProperty(value = "thumbprint", required = true) + private String thumbprint; + + /** + * Get the authorityUrl property: Authority URL used for authentication. + * + * @return the authorityUrl value. + */ + public String authorityUrl() { + return this.authorityUrl; + } + + /** + * Set the authorityUrl property: Authority URL used for authentication. + * + * @param authorityUrl the authorityUrl value to set. + * @return the CertificateDatastoreCredentials object itself. + */ + public CertificateDatastoreCredentials withAuthorityUrl(String authorityUrl) { + this.authorityUrl = authorityUrl; + return this; + } + + /** + * Get the clientId property: Service principal client ID. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.clientId; + } + + /** + * Set the clientId property: Service principal client ID. + * + * @param clientId the clientId value to set. + * @return the CertificateDatastoreCredentials object itself. + */ + public CertificateDatastoreCredentials withClientId(UUID clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the resourceUri property: Resource the service principal has access to. + * + * @return the resourceUri value. + */ + public String resourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: Resource the service principal has access to. + * + * @param resourceUri the resourceUri value to set. + * @return the CertificateDatastoreCredentials object itself. + */ + public CertificateDatastoreCredentials withResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the secrets property: Service principal secrets. + * + * @return the secrets value. + */ + public CertificateDatastoreSecrets secrets() { + return this.secrets; + } + + /** + * Set the secrets property: 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; + } + + /** + * Get the tenantId property: ID of the tenant to which the service principal belongs. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: ID of the tenant to which the service principal belongs. + * + * @param tenantId the tenantId value to set. + * @return the CertificateDatastoreCredentials object itself. + */ + public CertificateDatastoreCredentials withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the thumbprint property: Thumbprint of the certificate used for authentication. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the thumbprint property: Thumbprint of the certificate used for authentication. + * + * @param thumbprint the thumbprint value to set. + * @return the CertificateDatastoreCredentials object itself. + */ + public CertificateDatastoreCredentials withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (clientId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property clientId in model CertificateDatastoreCredentials")); + } + if (secrets() != null) { + secrets().validate(); + } + if (tenantId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property tenantId in model CertificateDatastoreCredentials")); + } + if (thumbprint() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property thumbprint in model CertificateDatastoreCredentials")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CertificateDatastoreSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CertificateDatastoreSecrets.java new file mode 100644 index 000000000000..c359ba583fa6 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CertificateDatastoreSecrets.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Datastore certificate secrets. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") +@JsonTypeName("Certificate") +@Fluent +public final class CertificateDatastoreSecrets extends DatastoreSecretsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateDatastoreSecrets.class); + + /* + * Service principal certificate. + */ + @JsonProperty(value = "certificate") + private String certificate; + + /** + * Get the certificate property: Service principal certificate. + * + * @return the certificate value. + */ + public String certificate() { + return this.certificate; + } + + /** + * Set the certificate property: Service principal certificate. + * + * @param certificate the certificate value to set. + * @return the CertificateDatastoreSecrets object itself. + */ + public CertificateDatastoreSecrets withCertificate(String certificate) { + this.certificate = certificate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CocoExportSummary.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CocoExportSummary.java new file mode 100644 index 000000000000..b0c4f1d3fd8f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CocoExportSummary.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The CocoExportSummary model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("Coco") +@Immutable +public final class CocoExportSummary extends ExportSummaryInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CocoExportSummary.class); + + /* + * The container name to which the labels will be exported. + */ + @JsonProperty(value = "containerName", access = JsonProperty.Access.WRITE_ONLY) + private String containerName; + + /* + * The output path where the labels will be exported. + */ + @JsonProperty(value = "snapshotPath", access = JsonProperty.Access.WRITE_ONLY) + private String snapshotPath; + + /** + * Get the containerName property: The container name to which the labels will be exported. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Get the snapshotPath property: The output path where the labels will be exported. + * + * @return the snapshotPath value. + */ + public String snapshotPath() { + return this.snapshotPath; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeConfiguration.java new file mode 100644 index 000000000000..4b090a49ffc0 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeConfiguration.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration for a scoring code asset. */ +@Fluent +public final class CodeConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeConfiguration.class); + + /* + * ARM resource ID of the code asset. + */ + @JsonProperty(value = "codeId") + private String codeId; + + /* + * The script to execute on startup. eg. "score.py" + */ + @JsonProperty(value = "scoringScript", required = true) + private String scoringScript; + + /** + * Get the codeId property: ARM resource ID of the code asset. + * + * @return the codeId value. + */ + public String codeId() { + return this.codeId; + } + + /** + * Set the codeId property: ARM resource ID of the code asset. + * + * @param codeId the codeId value to set. + * @return the CodeConfiguration object itself. + */ + public CodeConfiguration withCodeId(String codeId) { + this.codeId = codeId; + return this; + } + + /** + * Get the scoringScript property: The script to execute on startup. eg. "score.py". + * + * @return the scoringScript value. + */ + public String scoringScript() { + return this.scoringScript; + } + + /** + * Set the scoringScript property: The script to execute on startup. eg. "score.py". + * + * @param scoringScript the scoringScript value to set. + * @return the CodeConfiguration object itself. + */ + public CodeConfiguration withScoringScript(String scoringScript) { + this.scoringScript = scoringScript; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scoringScript() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property scoringScript in model CodeConfiguration")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainer.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainer.java new file mode 100644 index 000000000000..433c2b76a9d4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainer.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Container for code asset versions. */ +@Fluent +public final class CodeContainer { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeContainer.class); + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the CodeContainer object itself. + */ + public CodeContainer withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the CodeContainer object itself. + */ + public CodeContainer withProperties(Map properties) { + this.properties = properties; + 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 CodeContainer object itself. + */ + public CodeContainer withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainerResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainerResource.java new file mode 100644 index 000000000000..51824faf3bdc --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainerResource.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeContainerResourceInner; + +/** An immutable client-side representation of CodeContainerResource. */ +public interface CodeContainerResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + CodeContainer properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.CodeContainerResourceInner object. + * + * @return the inner object. + */ + CodeContainerResourceInner innerModel(); + + /** The entirety of the CodeContainerResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The CodeContainerResource definition stages. */ + interface DefinitionStages { + /** The first stage of the CodeContainerResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the CodeContainerResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the CodeContainerResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(CodeContainer properties); + } + /** + * The stage of the CodeContainerResource 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. + */ + CodeContainerResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CodeContainerResource create(Context context); + } + } + /** + * Begins update for the CodeContainerResource resource. + * + * @return the stage of resource update. + */ + CodeContainerResource.Update update(); + + /** The template for CodeContainerResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CodeContainerResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CodeContainerResource apply(Context context); + } + /** The CodeContainerResource update stages. */ + interface UpdateStages { + /** The stage of the CodeContainerResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(CodeContainer properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CodeContainerResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CodeContainerResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainerResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainerResourceArmPaginatedResult.java new file mode 100644 index 000000000000..e4f0aafd1126 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainerResourceArmPaginatedResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeContainerResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of CodeContainer entities. */ +@Fluent +public final class CodeContainerResourceArmPaginatedResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeContainerResourceArmPaginatedResult.class); + + /* + * The link to the next page of CodeContainer objects. If null, there are + * no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type CodeContainer. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of CodeContainer 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 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; + } + + /** + * Get the value property: An array of objects of type CodeContainer. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainers.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainers.java new file mode 100644 index 000000000000..7f8ac97da8ae --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeContainers.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 CodeContainers. */ +public interface CodeContainers { + /** + * 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context); + + /** + * Delete container. + * + * @param name Container 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. + */ + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get container. + * + * @param name Container 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 container. + */ + CodeContainerResource get(String name, String resourceGroupName, String workspaceName); + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * 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. + */ + CodeContainerResource getById(String id); + + /** + * Get container. + * + * @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 container. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete 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. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CodeContainerResource resource. + * + * @param name resource name. + * @return the first stage of the new CodeContainerResource definition. + */ + CodeContainerResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersion.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersion.java new file mode 100644 index 000000000000..51f965f42219 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersion.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Code asset version details. */ +@Fluent +public final class CodeVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeVersion.class); + + /* + * ARM resource ID of the datastore where the asset is located. + */ + @JsonProperty(value = "datastoreId") + private String datastoreId; + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * If the name version are system generated (anonymous registration). + */ + @JsonProperty(value = "isAnonymous") + private Boolean isAnonymous; + + /* + * The path of the file/directory in the datastore. + */ + @JsonProperty(value = "path", required = true) + private String path; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. + * + * @return the datastoreId value. + */ + public String datastoreId() { + return this.datastoreId; + } + + /** + * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. + * + * @param datastoreId the datastoreId value to set. + * @return the CodeVersion object itself. + */ + public CodeVersion withDatastoreId(String datastoreId) { + this.datastoreId = datastoreId; + return this; + } + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the CodeVersion object itself. + */ + public CodeVersion withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the isAnonymous property: If the name version are system generated (anonymous registration). + * + * @return the isAnonymous value. + */ + public Boolean isAnonymous() { + return this.isAnonymous; + } + + /** + * Set the isAnonymous property: If the name version are system generated (anonymous registration). + * + * @param isAnonymous the isAnonymous value to set. + * @return the CodeVersion object itself. + */ + public CodeVersion withIsAnonymous(Boolean isAnonymous) { + this.isAnonymous = isAnonymous; + return this; + } + + /** + * 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 CodeVersion object itself. + */ + public CodeVersion withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the CodeVersion object itself. + */ + public CodeVersion withProperties(Map properties) { + this.properties = properties; + 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 CodeVersion object itself. + */ + public CodeVersion withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (path() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property path in model CodeVersion")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersionResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersionResource.java new file mode 100644 index 000000000000..974d0dc85a69 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersionResource.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeVersionResourceInner; + +/** An immutable client-side representation of CodeVersionResource. */ +public interface CodeVersionResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + CodeVersion properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.CodeVersionResourceInner object. + * + * @return the inner object. + */ + CodeVersionResourceInner innerModel(); + + /** The entirety of the CodeVersionResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The CodeVersionResource definition stages. */ + interface DefinitionStages { + /** The first stage of the CodeVersionResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the CodeVersionResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies name, resourceGroupName, workspaceName. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingCode(String name, String resourceGroupName, String workspaceName); + } + /** The stage of the CodeVersionResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(CodeVersion properties); + } + /** + * The stage of the CodeVersionResource 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. + */ + CodeVersionResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CodeVersionResource create(Context context); + } + } + /** + * Begins update for the CodeVersionResource resource. + * + * @return the stage of resource update. + */ + CodeVersionResource.Update update(); + + /** The template for CodeVersionResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CodeVersionResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CodeVersionResource apply(Context context); + } + /** The CodeVersionResource update stages. */ + interface UpdateStages { + /** The stage of the CodeVersionResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(CodeVersion properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CodeVersionResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CodeVersionResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersionResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersionResourceArmPaginatedResult.java new file mode 100644 index 000000000000..681e7fa0a54e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersionResourceArmPaginatedResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.CodeVersionResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of CodeVersion entities. */ +@Fluent +public final class CodeVersionResourceArmPaginatedResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CodeVersionResourceArmPaginatedResult.class); + + /* + * The link to the next page of CodeVersion objects. If null, there are no + * additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type CodeVersion. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of CodeVersion 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 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; + } + + /** + * Get the value property: An array of objects of type CodeVersion. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersions.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersions.java new file mode 100644 index 000000000000..167f0c937de8 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CodeVersions.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 CodeVersions. */ +public interface CodeVersions { + /** + * List versions. + * + * @param name Container 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 CodeVersion entities. + */ + PagedIterable list(String name, String resourceGroupName, String workspaceName); + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of CodeVersion entities. + */ + PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 delete(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + CodeVersionResource get(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @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 version. + */ + CodeVersionResource getById(String id); + + /** + * Get version. + * + * @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 version. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @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 version. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CodeVersionResource resource. + * + * @param name resource name. + * @return the first stage of the new CodeVersionResource definition. + */ + CodeVersionResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CommandJob.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CommandJob.java new file mode 100644 index 000000000000..a3be62a2d14c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CommandJob.java @@ -0,0 +1,472 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.Duration; +import java.util.Map; + +/** Command job definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") +@JsonTypeName("Command") +@Fluent +public final class CommandJob extends JobBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CommandJob.class); + + /* + * ARM resource ID of the code asset. + */ + @JsonProperty(value = "codeId") + private String codeId; + + /* + * The command to execute on startup of the job. eg. "python train.py" + */ + @JsonProperty(value = "command", required = true) + private String command; + + /* + * Compute binding for the job. + */ + @JsonProperty(value = "compute", required = true) + private ComputeConfiguration compute; + + /* + * Distribution configuration of the job. If set, this should be one of + * Mpi, Tensorflow, PyTorch, or null. + */ + @JsonProperty(value = "distribution") + private DistributionConfiguration distribution; + + /* + * The ARM resource ID of the Environment specification for the job. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * Environment variables included in the job. + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * The name of the experiment the job belongs to. If not set, the job is + * placed in the "Default" experiment. + */ + @JsonProperty(value = "experimentName") + private String experimentName; + + /* + * Identity configuration. If set, this should be one of AmlToken, + * ManagedIdentity, or null. + * Defaults to AmlToken if null. + */ + @JsonProperty(value = "identity") + private IdentityConfiguration identity; + + /* + * Mapping of input data bindings used in the job. + */ + @JsonProperty(value = "inputDataBindings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map inputDataBindings; + + /* + * Location of the job output logs and artifacts. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private JobOutput output; + + /* + * Mapping of output data bindings used in the job. + */ + @JsonProperty(value = "outputDataBindings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map outputDataBindings; + + /* + * Input parameters. + */ + @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map parameters; + + /* + * Job priority for scheduling policy. Only applies to AMLCompute. + * Private preview feature and only available to users on the allow list. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /* + * Status of the job. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private JobStatus status; + + /* + * The max run duration in ISO 8601 format, after which the job will be + * cancelled. Only supports duration with precision as low as Seconds. + */ + @JsonProperty(value = "timeout") + private Duration timeout; + + /** + * Get the codeId property: ARM resource ID of the code asset. + * + * @return the codeId value. + */ + public String codeId() { + return this.codeId; + } + + /** + * Set the codeId property: ARM resource ID of the code asset. + * + * @param codeId the codeId value to set. + * @return the CommandJob object itself. + */ + public CommandJob withCodeId(String codeId) { + this.codeId = codeId; + return this; + } + + /** + * Get the command property: The command to execute on startup of the job. eg. "python train.py". + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: The command to execute on startup of the job. eg. "python train.py". + * + * @param command the command value to set. + * @return the CommandJob object itself. + */ + public CommandJob withCommand(String command) { + this.command = command; + return this; + } + + /** + * Get the compute property: Compute binding for the job. + * + * @return the compute value. + */ + public ComputeConfiguration compute() { + return this.compute; + } + + /** + * Set the compute property: Compute binding for the job. + * + * @param compute the compute value to set. + * @return the CommandJob object itself. + */ + public CommandJob withCompute(ComputeConfiguration compute) { + this.compute = compute; + 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 CommandJob object itself. + */ + public CommandJob withDistribution(DistributionConfiguration distribution) { + this.distribution = distribution; + return this; + } + + /** + * Get the environmentId property: The ARM resource ID of the Environment specification for the job. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: The ARM resource ID of the Environment specification for the job. + * + * @param environmentId the environmentId value to set. + * @return the CommandJob object itself. + */ + public CommandJob withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the environmentVariables property: Environment variables included in the job. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment variables included in the job. + * + * @param environmentVariables the environmentVariables value to set. + * @return the CommandJob object itself. + */ + public CommandJob withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + 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. + * + * @return the experimentName value. + */ + public String experimentName() { + return this.experimentName; + } + + /** + * 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 experimentName the experimentName value to set. + * @return the CommandJob object itself. + */ + public CommandJob withExperimentName(String experimentName) { + this.experimentName = experimentName; + return this; + } + + /** + * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, or + * null. Defaults to AmlToken if null. + * + * @return the identity value. + */ + public IdentityConfiguration identity() { + return this.identity; + } + + /** + * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, or + * null. Defaults to AmlToken if null. + * + * @param identity the identity value to set. + * @return the CommandJob object itself. + */ + public CommandJob withIdentity(IdentityConfiguration identity) { + this.identity = identity; + return this; + } + + /** + * Get the inputDataBindings property: Mapping of input data bindings used in the job. + * + * @return the inputDataBindings value. + */ + public Map inputDataBindings() { + return this.inputDataBindings; + } + + /** + * Set the inputDataBindings property: Mapping of input data bindings used in the job. + * + * @param inputDataBindings the inputDataBindings value to set. + * @return the CommandJob object itself. + */ + public CommandJob withInputDataBindings(Map inputDataBindings) { + this.inputDataBindings = inputDataBindings; + return this; + } + + /** + * Get the output property: Location of the job output logs and artifacts. + * + * @return the output value. + */ + public JobOutput output() { + return this.output; + } + + /** + * Get the outputDataBindings property: Mapping of output data bindings used in the job. + * + * @return the outputDataBindings value. + */ + public Map outputDataBindings() { + return this.outputDataBindings; + } + + /** + * Set the outputDataBindings property: Mapping of output data bindings used in the job. + * + * @param outputDataBindings the outputDataBindings value to set. + * @return the CommandJob object itself. + */ + public CommandJob withOutputDataBindings(Map outputDataBindings) { + this.outputDataBindings = outputDataBindings; + return this; + } + + /** + * Get the parameters property: Input parameters. + * + * @return the parameters value. + */ + public Map parameters() { + return this.parameters; + } + + /** + * Get the priority property: Job priority for scheduling policy. Only applies to AMLCompute. Private preview + * feature and only available to users on the allow list. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: Job priority for scheduling policy. Only applies to AMLCompute. Private preview + * feature and only available to users on the allow list. + * + * @param priority the priority value to set. + * @return the CommandJob object itself. + */ + public CommandJob withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the status property: Status of the job. + * + * @return the status value. + */ + public JobStatus status() { + return this.status; + } + + /** + * Get the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled. Only + * supports duration with precision as low as Seconds. + * + * @return the timeout value. + */ + public Duration timeout() { + return this.timeout; + } + + /** + * Set the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled. Only + * supports duration with precision as low as Seconds. + * + * @param timeout the timeout value to set. + * @return the CommandJob object itself. + */ + public CommandJob withTimeout(Duration timeout) { + this.timeout = timeout; + return this; + } + + /** {@inheritDoc} */ + @Override + public CommandJob withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public CommandJob withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public CommandJob withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (command() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property command in model CommandJob")); + } + if (compute() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property compute in model CommandJob")); + } else { + compute().validate(); + } + if (distribution() != null) { + distribution().validate(); + } + if (identity() != null) { + identity().validate(); + } + if (inputDataBindings() != null) { + inputDataBindings() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (output() != null) { + output().validate(); + } + if (outputDataBindings() != null) { + outputDataBindings() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeConfiguration.java new file mode 100644 index 000000000000..8079226b7f07 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeConfiguration.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Configuration for compute binding. */ +@Fluent +public final class ComputeConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeConfiguration.class); + + /* + * Number of instances or nodes. + */ + @JsonProperty(value = "instanceCount") + private Integer instanceCount; + + /* + * SKU type to run on. + */ + @JsonProperty(value = "instanceType") + private String instanceType; + + /* + * Set to true for jobs running on local compute. + */ + @JsonProperty(value = "isLocal") + private Boolean isLocal; + + /* + * Location for virtual cluster run. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Additional properties. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * ARM resource ID of the compute resource. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Get the instanceCount property: Number of instances or nodes. + * + * @return the instanceCount value. + */ + public Integer instanceCount() { + return this.instanceCount; + } + + /** + * Set the instanceCount property: Number of instances or nodes. + * + * @param instanceCount the instanceCount value to set. + * @return the ComputeConfiguration object itself. + */ + public ComputeConfiguration withInstanceCount(Integer instanceCount) { + this.instanceCount = instanceCount; + return this; + } + + /** + * Get the instanceType property: SKU type to run on. + * + * @return the instanceType value. + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the instanceType property: SKU type to run on. + * + * @param instanceType the instanceType value to set. + * @return the ComputeConfiguration object itself. + */ + public ComputeConfiguration withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + + /** + * Get the isLocal property: Set to true for jobs running on local compute. + * + * @return the isLocal value. + */ + public Boolean isLocal() { + return this.isLocal; + } + + /** + * Set the isLocal property: Set to true for jobs running on local compute. + * + * @param isLocal the isLocal value to set. + * @return the ComputeConfiguration object itself. + */ + public ComputeConfiguration withIsLocal(Boolean isLocal) { + this.isLocal = isLocal; + return this; + } + + /** + * Get the location property: Location for virtual cluster run. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Location for virtual cluster run. + * + * @param location the location value to set. + * @return the ComputeConfiguration object itself. + */ + public ComputeConfiguration withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties property: Additional properties. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Additional properties. + * + * @param properties the properties value to set. + * @return the ComputeConfiguration object itself. + */ + public ComputeConfiguration withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the target property: ARM resource ID of the compute resource. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: ARM resource ID of the compute resource. + * + * @param target the target value to set. + * @return the ComputeConfiguration object itself. + */ + public ComputeConfiguration withTarget(String target) { + this.target = target; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeEnvironmentType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeEnvironmentType.java deleted file mode 100644 index a792b0e5311e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeEnvironmentType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputeEnvironmentType. */ -public final class ComputeEnvironmentType extends ExpandableStringEnum { - /** Static value ACI for ComputeEnvironmentType. */ - public static final ComputeEnvironmentType ACI = fromString("ACI"); - - /** Static value AKS for ComputeEnvironmentType. */ - public static final ComputeEnvironmentType AKS = fromString("AKS"); - - /** - * Creates or finds a ComputeEnvironmentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeEnvironmentType. - */ - @JsonCreator - public static ComputeEnvironmentType fromString(String name) { - return fromString(name, ComputeEnvironmentType.class); - } - - /** @return known ComputeEnvironmentType values. */ - public static Collection values() { - return values(ComputeEnvironmentType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceProperties.java index 9e76ddfdb8f3..e1528006442c 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceProperties.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceProperties.java @@ -29,9 +29,10 @@ public final class ComputeInstanceProperties { private ResourceId subnet; /* - * 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 + * 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. */ @JsonProperty(value = "applicationSharingPolicy") @@ -63,7 +64,7 @@ public final class ComputeInstanceProperties { private ComputeInstanceCreatedBy createdBy; /* - * Collection of errors encountered on this ComputeInstance. + * Errors. Collection of errors encountered on this ComputeInstance. */ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private List errors; @@ -75,8 +76,8 @@ public final class ComputeInstanceProperties { private ComputeInstanceState state; /* - * The Compute Instance Authorization type. Available values are personal - * (default). + * Compute Instance Authorization type. The Compute Instance Authorization + * type. Available values are personal (default). */ @JsonProperty(value = "computeInstanceAuthorizationType") private ComputeInstanceAuthorizationType computeInstanceAuthorizationType; @@ -99,6 +100,12 @@ public final class ComputeInstanceProperties { @JsonProperty(value = "lastOperation", access = JsonProperty.Access.WRITE_ONLY) private ComputeInstanceLastOperation lastOperation; + /* + * The list of schedules to be applied on the compute instance. + */ + @JsonProperty(value = "schedules") + private ComputeSchedules schedules; + /** * Get the vmSize property: Virtual Machine Size. * @@ -140,9 +147,10 @@ public ComputeInstanceProperties withSubnet(ResourceId subnet) { } /** - * Get the applicationSharingPolicy property: 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. + * Get the applicationSharingPolicy property: 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. * * @return the applicationSharingPolicy value. */ @@ -151,9 +159,10 @@ public ApplicationSharingPolicy applicationSharingPolicy() { } /** - * Set the applicationSharingPolicy property: 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. + * Set the applicationSharingPolicy property: 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. * * @param applicationSharingPolicy the applicationSharingPolicy value to set. * @return the ComputeInstanceProperties object itself. @@ -211,7 +220,7 @@ public ComputeInstanceCreatedBy createdBy() { } /** - * Get the errors property: Collection of errors encountered on this ComputeInstance. + * Get the errors property: Errors. Collection of errors encountered on this ComputeInstance. * * @return the errors value. */ @@ -229,8 +238,8 @@ public ComputeInstanceState state() { } /** - * Get the computeInstanceAuthorizationType property: The Compute Instance Authorization type. Available values are - * personal (default). + * Get the computeInstanceAuthorizationType property: Compute Instance Authorization type. The Compute Instance + * Authorization type. Available values are personal (default). * * @return the computeInstanceAuthorizationType value. */ @@ -239,8 +248,8 @@ public ComputeInstanceAuthorizationType computeInstanceAuthorizationType() { } /** - * Set the computeInstanceAuthorizationType property: The Compute Instance Authorization type. Available values are - * personal (default). + * Set the computeInstanceAuthorizationType property: Compute Instance Authorization type. The Compute Instance + * Authorization type. Available values are personal (default). * * @param computeInstanceAuthorizationType the computeInstanceAuthorizationType value to set. * @return the ComputeInstanceProperties object itself. @@ -301,6 +310,26 @@ public ComputeInstanceLastOperation lastOperation() { return this.lastOperation; } + /** + * Get the schedules property: The list of schedules to be applied on the compute instance. + * + * @return the schedules value. + */ + public ComputeSchedules schedules() { + return this.schedules; + } + + /** + * Set the schedules property: The list of schedules to be applied on the compute instance. + * + * @param schedules the schedules value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withSchedules(ComputeSchedules schedules) { + this.schedules = schedules; + return this; + } + /** * Validates the instance. * @@ -331,5 +360,8 @@ public void validate() { if (lastOperation() != null) { lastOperation().validate(); } + if (schedules() != null) { + schedules().validate(); + } } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceSshSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceSshSettings.java index 3256a9a55cb9..3759acbbd3fa 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceSshSettings.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeInstanceSshSettings.java @@ -15,10 +15,10 @@ public final class ComputeInstanceSshSettings { @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeInstanceSshSettings.class); /* - * 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. + * 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. */ @JsonProperty(value = "sshPublicAccess") private SshPublicAccess sshPublicAccess; @@ -43,9 +43,9 @@ public final class ComputeInstanceSshSettings { private String adminPublicKey; /** - * 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. */ @@ -54,9 +54,9 @@ 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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputePowerAction.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputePowerAction.java new file mode 100644 index 000000000000..26010b2bab7c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputePowerAction.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ComputePowerAction. */ +public final class ComputePowerAction extends ExpandableStringEnum { + /** Static value Start for ComputePowerAction. */ + public static final ComputePowerAction START = fromString("Start"); + + /** Static value Stop for ComputePowerAction. */ + public static final ComputePowerAction STOP = fromString("Stop"); + + /** + * Creates or finds a ComputePowerAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComputePowerAction. + */ + @JsonCreator + public static ComputePowerAction fromString(String name) { + return fromString(name, ComputePowerAction.class); + } + + /** @return known ComputePowerAction values. */ + public static Collection values() { + return values(ComputePowerAction.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeResource.java index 1c750848ed8c..38d8c5da83db 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeResource.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeResource.java @@ -36,32 +36,25 @@ public interface ComputeResource { 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. + * Gets the identity property: The identity of the resource. * - * @return the tags value. + * @return the identity value. */ - Map tags(); + Identity identity(); /** - * Gets the properties property: Compute properties. + * Gets the location property: Specifies the location of the resource. * - * @return the properties value. + * @return the location value. */ - Compute properties(); + String location(); /** - * Gets the identity property: The identity of the resource. + * Gets the tags property: Contains resource tags defined as key/value pairs. * - * @return the identity value. + * @return the tags value. */ - Identity identity(); + Map tags(); /** * Gets the sku property: The sku of the workspace. @@ -71,12 +64,19 @@ public interface ComputeResource { Sku sku(); /** - * Gets the systemData property: Read only system data. + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ SystemData systemData(); + /** + * Gets the properties property: Compute properties. + * + * @return the properties value. + */ + Compute properties(); + /** * Gets the region of the resource. * @@ -100,40 +100,19 @@ public interface ComputeResource { /** The entirety of the ComputeResource definition. */ interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** The ComputeResource definition stages. */ interface DefinitionStages { /** The first stage of the ComputeResource definition. */ - interface Blank extends WithLocation { - } - /** The stage of the ComputeResource 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); + interface Blank extends WithParentResource { } /** The stage of the ComputeResource definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @return the next definition stage. */ @@ -144,10 +123,11 @@ interface WithParentResource { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithProperties, + extends DefinitionStages.WithLocation, + DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithSku { + DefinitionStages.WithSku, + DefinitionStages.WithProperties { /** * Executes the create request. * @@ -163,25 +143,33 @@ interface WithCreate */ ComputeResource create(Context context); } - /** The stage of the ComputeResource definition allowing to specify tags. */ - interface WithTags { + /** The stage of the ComputeResource definition allowing to specify location. */ + interface WithLocation { /** - * Specifies the tags property: Resource tags.. + * Specifies the region for the resource. * - * @param tags Resource tags. + * @param location Specifies the location of the resource. * @return the next definition stage. */ - WithCreate withTags(Map tags); + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location Specifies the location of the resource. + * @return the next definition stage. + */ + WithCreate withRegion(String location); } - /** The stage of the ComputeResource definition allowing to specify properties. */ - interface WithProperties { + /** The stage of the ComputeResource definition allowing to specify tags. */ + interface WithTags { /** - * Specifies the properties property: Compute properties. + * Specifies the tags property: Contains resource tags defined as key/value pairs.. * - * @param properties Compute properties. + * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ - WithCreate withProperties(Compute properties); + WithCreate withTags(Map tags); } /** The stage of the ComputeResource definition allowing to specify identity. */ interface WithIdentity { @@ -203,6 +191,16 @@ interface WithSku { */ WithCreate withSku(Sku sku); } + /** The stage of the ComputeResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Compute properties. + * + * @param properties Compute properties. + * @return the next definition stage. + */ + WithCreate withProperties(Compute properties); + } } /** * Begins update for the ComputeResource resource. @@ -261,7 +259,7 @@ interface WithScaleSettings { * * @throws com.azure.core.management.exception.ManagementException 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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ PagedIterable listNodes(); @@ -272,7 +270,7 @@ interface WithScaleSettings { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ PagedIterable listNodes(Context context); @@ -350,4 +348,24 @@ interface WithScaleSettings { * @return the response. */ Response restartWithResponse(Context context); + + /** + * Updates schedules of a compute instance. + * + * @throws com.azure.core.management.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 updateSchedules(); + + /** + * Updates schedules of a compute instance. + * + * @param parameters The object for updating schedules 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 response. + */ + Response updateSchedulesWithResponse(ComputeSchedules parameters, Context context); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeSchedules.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeSchedules.java new file mode 100644 index 000000000000..9aedf7a6a0aa --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeSchedules.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of schedules to be applied on the computes. */ +@Fluent +public final class ComputeSchedules { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeSchedules.class); + + /* + * The list of compute start stop schedules to be applied. + */ + @JsonProperty(value = "computeStartStop") + private List computeStartStop; + + /** + * Get the computeStartStop property: The list of compute start stop schedules to be applied. + * + * @return the computeStartStop value. + */ + public List computeStartStop() { + return this.computeStartStop; + } + + /** + * Set the computeStartStop property: The list of compute start stop schedules to be applied. + * + * @param computeStartStop the computeStartStop value to set. + * @return the ComputeSchedules object itself. + */ + public ComputeSchedules withComputeStartStop(List computeStartStop) { + this.computeStartStop = computeStartStop; + 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()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeStartStopSchedule.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeStartStopSchedule.java new file mode 100644 index 000000000000..37ad8e566190 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputeStartStopSchedule.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Compute start stop schedule properties. */ +@Fluent +public final class ComputeStartStopSchedule { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputeStartStopSchedule.class); + + /* + * Schedule id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The current deployment state of schedule. + */ + @JsonProperty(value = "provisioningStatus", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningStatus provisioningStatus; + + /* + * The schedule status. + */ + @JsonProperty(value = "status") + private ScheduleStatus status; + + /* + * The schedule trigger type. + */ + @JsonProperty(value = "triggerType") + private TriggerType triggerType; + + /* + * The compute power action. + */ + @JsonProperty(value = "action") + private ComputePowerAction action; + + /* + * The workflow trigger recurrence for ComputeStartStop schedule type. + */ + @JsonProperty(value = "recurrence") + private Recurrence recurrence; + + /* + * The workflow trigger cron for ComputeStartStop schedule type. + */ + @JsonProperty(value = "cron") + private Cron cron; + + /** + * Get the id property: Schedule id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the provisioningStatus property: The current deployment state of schedule. + * + * @return the provisioningStatus value. + */ + public ProvisioningStatus provisioningStatus() { + return this.provisioningStatus; + } + + /** + * Get the status property: The schedule status. + * + * @return the status value. + */ + public ScheduleStatus status() { + return this.status; + } + + /** + * Set the status property: The schedule status. + * + * @param status the status value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withStatus(ScheduleStatus status) { + this.status = status; + return this; + } + + /** + * Get the triggerType property: The schedule trigger type. + * + * @return the triggerType value. + */ + public TriggerType triggerType() { + return this.triggerType; + } + + /** + * Set the triggerType property: The schedule trigger type. + * + * @param triggerType the triggerType value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withTriggerType(TriggerType triggerType) { + this.triggerType = triggerType; + return this; + } + + /** + * Get the action property: The compute power action. + * + * @return the action value. + */ + public ComputePowerAction action() { + return this.action; + } + + /** + * Set the action property: The compute power action. + * + * @param action the action value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withAction(ComputePowerAction action) { + this.action = action; + return this; + } + + /** + * Get the recurrence property: The workflow trigger recurrence for ComputeStartStop schedule type. + * + * @return the recurrence value. + */ + public Recurrence recurrence() { + return this.recurrence; + } + + /** + * Set the recurrence property: The workflow trigger recurrence for ComputeStartStop schedule type. + * + * @param recurrence the recurrence value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withRecurrence(Recurrence recurrence) { + this.recurrence = recurrence; + return this; + } + + /** + * Get the cron property: The workflow trigger cron for ComputeStartStop schedule type. + * + * @return the cron value. + */ + public Cron cron() { + return this.cron; + } + + /** + * Set the cron property: The workflow trigger cron for ComputeStartStop schedule type. + * + * @param cron the cron value to set. + * @return the ComputeStartStopSchedule object itself. + */ + public ComputeStartStopSchedule withCron(Cron cron) { + this.cron = cron; + 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(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputes.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Computes.java similarity index 78% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputes.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Computes.java index 9868bffd19e7..c719de558a97 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputes.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Computes.java @@ -8,24 +8,24 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of MachineLearningComputes. */ -public interface MachineLearningComputes { +/** Resource collection API of Computes. */ +public interface Computes { /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName); /** * Gets computes in specified workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -34,14 +34,13 @@ public interface MachineLearningComputes { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return computes in specified workspace. */ - PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, String skip, Context context); + 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 Name of the resource group in which workspace is located. + * @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. @@ -55,7 +54,7 @@ PagedIterable listByWorkspace( * 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 Name of the resource group in which workspace is located. + * @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. @@ -70,7 +69,7 @@ Response getWithResponse( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -88,7 +87,7 @@ void delete( /** * Deletes specified Machine Learning compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 @@ -108,13 +107,13 @@ void delete( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 com.azure.core.management.exception.ManagementException 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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ PagedIterable listNodes( String resourceGroupName, String workspaceName, String computeName); @@ -122,14 +121,14 @@ PagedIterable listNodes( /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 com.azure.core.management.exception.ManagementException 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. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute. */ PagedIterable listNodes( String resourceGroupName, String workspaceName, String computeName, Context context); @@ -137,7 +136,7 @@ PagedIterable listNodes( /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -150,7 +149,7 @@ PagedIterable listNodes( /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -165,7 +164,7 @@ Response listKeysWithResponse( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -177,7 +176,7 @@ Response listKeysWithResponse( /** * Posts a start action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -190,7 +189,7 @@ Response listKeysWithResponse( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -202,7 +201,7 @@ Response listKeysWithResponse( /** * Posts a stop action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -215,7 +214,7 @@ Response listKeysWithResponse( /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -227,7 +226,7 @@ Response listKeysWithResponse( /** * Posts a restart action to a compute instance. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -239,6 +238,38 @@ Response listKeysWithResponse( Response restartWithResponse( String resourceGroupName, String workspaceName, String computeName, Context context); + /** + * Updates schedules 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 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. + */ + void updateSchedules(String resourceGroupName, String workspaceName, String computeName); + + /** + * Updates schedules 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 computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating schedules 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 response. + */ + Response updateSchedulesWithResponse( + String resourceGroupName, + String workspaceName, + String computeName, + ComputeSchedules 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesCreateOrUpdateHeaders.java similarity index 73% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateHeaders.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesCreateOrUpdateHeaders.java index b29ece78b30b..3560acea36de 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateHeaders.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesCreateOrUpdateHeaders.java @@ -9,11 +9,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** The MachineLearningServicesCreateOrUpdateHeaders model. */ +/** The ComputesCreateOrUpdateHeaders model. */ @Fluent -public final class MachineLearningServicesCreateOrUpdateHeaders { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MachineLearningServicesCreateOrUpdateHeaders.class); +public final class ComputesCreateOrUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputesCreateOrUpdateHeaders.class); /* * The Azure-AsyncOperation property. @@ -34,9 +33,9 @@ public String azureAsyncOperation() { * Set the azureAsyncOperation property: The Azure-AsyncOperation property. * * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the MachineLearningServicesCreateOrUpdateHeaders object itself. + * @return the ComputesCreateOrUpdateHeaders object itself. */ - public MachineLearningServicesCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + public ComputesCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { this.azureAsyncOperation = azureAsyncOperation; return this; } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesCreateOrUpdateResponse.java similarity index 71% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateResponse.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesCreateOrUpdateResponse.java index a30e727835bd..4aec9227ff15 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateResponse.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesCreateOrUpdateResponse.java @@ -10,23 +10,23 @@ import com.azure.resourcemanager.machinelearningservices.fluent.models.ComputeResourceInner; /** Contains all response data for the createOrUpdate operation. */ -public final class MachineLearningComputesCreateOrUpdateResponse - extends ResponseBase { +public final class ComputesCreateOrUpdateResponse + extends ResponseBase { /** - * Creates an instance of MachineLearningComputesCreateOrUpdateResponse. + * Creates an instance of ComputesCreateOrUpdateResponse. * - * @param request the request which resulted in this MachineLearningComputesCreateOrUpdateResponse. + * @param request the request which resulted in this ComputesCreateOrUpdateResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public MachineLearningComputesCreateOrUpdateResponse( + public ComputesCreateOrUpdateResponse( HttpRequest request, int statusCode, HttpHeaders rawHeaders, ComputeResourceInner value, - MachineLearningComputesCreateOrUpdateHeaders headers) { + ComputesCreateOrUpdateHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesDeleteHeaders.java similarity index 78% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteHeaders.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesDeleteHeaders.java index b8600ac86e2f..7f894c82b3a1 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteHeaders.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesDeleteHeaders.java @@ -9,10 +9,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** The MachineLearningComputesDeleteHeaders model. */ +/** The ComputesDeleteHeaders model. */ @Fluent -public final class MachineLearningComputesDeleteHeaders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MachineLearningComputesDeleteHeaders.class); +public final class ComputesDeleteHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ComputesDeleteHeaders.class); /* * The Azure-AsyncOperation property. @@ -39,9 +39,9 @@ public String azureAsyncOperation() { * Set the azureAsyncOperation property: The Azure-AsyncOperation property. * * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the MachineLearningComputesDeleteHeaders object itself. + * @return the ComputesDeleteHeaders object itself. */ - public MachineLearningComputesDeleteHeaders withAzureAsyncOperation(String azureAsyncOperation) { + public ComputesDeleteHeaders withAzureAsyncOperation(String azureAsyncOperation) { this.azureAsyncOperation = azureAsyncOperation; return this; } @@ -59,9 +59,9 @@ public String location() { * Set the location property: The Location property. * * @param location the location value to set. - * @return the MachineLearningComputesDeleteHeaders object itself. + * @return the ComputesDeleteHeaders object itself. */ - public MachineLearningComputesDeleteHeaders withLocation(String location) { + public ComputesDeleteHeaders withLocation(String location) { this.location = location; return this; } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesDeleteResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesDeleteResponse.java new file mode 100644 index 000000000000..00c26b9caebc --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ComputesDeleteResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class ComputesDeleteResponse extends ResponseBase { + /** + * Creates an instance of ComputesDeleteResponse. + * + * @param request the request which resulted in this ComputesDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ComputesDeleteResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, ComputesDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistry.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistry.java deleted file mode 100644 index 6e7e304461b6..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistry.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ContainerRegistry model. */ -@Fluent -public class ContainerRegistry { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerRegistry.class); - - /* - * The address property. - */ - @JsonProperty(value = "address") - private String address; - - /* - * The username property. - */ - @JsonProperty(value = "username") - private String username; - - /* - * The password property. - */ - @JsonProperty(value = "password") - private String password; - - /** - * Get the address property: The address property. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: The address property. - * - * @param address the address value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The username property. - * - * @param username the username value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password property. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password property. - * - * @param password the password value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withPassword(String password) { - this.password = password; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerType.java new file mode 100644 index 000000000000..b98d6bb621fc --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerType. */ +public final class ContainerType extends ExpandableStringEnum { + /** Static value StorageInitializer for ContainerType. */ + public static final ContainerType STORAGE_INITIALIZER = fromString("StorageInitializer"); + + /** Static value InferenceServer for ContainerType. */ + public static final ContainerType INFERENCE_SERVER = fromString("InferenceServer"); + + /** + * Creates or finds a ContainerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerType. + */ + @JsonCreator + public static ContainerType fromString(String name) { + return fromString(name, ContainerType.class); + } + + /** @return known ContainerType values. */ + public static Collection values() { + return values(ContainerType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContentsType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContentsType.java new file mode 100644 index 000000000000..d7c47d8f9fcd --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContentsType.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContentsType. */ +public final class ContentsType extends ExpandableStringEnum { + /** Static value AzureBlob for ContentsType. */ + public static final ContentsType AZURE_BLOB = fromString("AzureBlob"); + + /** Static value AzureDataLakeGen1 for ContentsType. */ + public static final ContentsType AZURE_DATA_LAKE_GEN1 = fromString("AzureDataLakeGen1"); + + /** Static value AzureDataLakeGen2 for ContentsType. */ + public static final ContentsType AZURE_DATA_LAKE_GEN2 = fromString("AzureDataLakeGen2"); + + /** Static value AzureFile for ContentsType. */ + public static final ContentsType AZURE_FILE = fromString("AzureFile"); + + /** Static value AzureMySql for ContentsType. */ + public static final ContentsType AZURE_MY_SQL = fromString("AzureMySql"); + + /** Static value AzurePostgreSql for ContentsType. */ + public static final ContentsType AZURE_POSTGRE_SQL = fromString("AzurePostgreSql"); + + /** Static value AzureSqlDatabase for ContentsType. */ + public static final ContentsType AZURE_SQL_DATABASE = fromString("AzureSqlDatabase"); + + /** Static value GlusterFs for ContentsType. */ + public static final ContentsType GLUSTER_FS = fromString("GlusterFs"); + + /** + * Creates or finds a ContentsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContentsType. + */ + @JsonCreator + public static ContentsType fromString(String name) { + return fromString(name, ContentsType.class); + } + + /** @return known ContentsType values. */ + public static Collection values() { + return values(ContentsType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateEndpointVariantRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateEndpointVariantRequest.java deleted file mode 100644 index 737269cd7431..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateEndpointVariantRequest.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The Variant properties. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = CreateEndpointVariantRequest.class) -@JsonTypeName("Custom") -@JsonSubTypes({@JsonSubTypes.Type(name = "AKS", value = AksServiceCreateRequest.class)}) -@Fluent -public class CreateEndpointVariantRequest extends CreateServiceRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateEndpointVariantRequest.class); - - /* - * Is this the default variant. - */ - @JsonProperty(value = "isDefault") - private Boolean isDefault; - - /* - * The amount of traffic variant receives. - */ - @JsonProperty(value = "trafficPercentile") - private Float trafficPercentile; - - /* - * The type of the variant. - */ - @JsonProperty(value = "type") - private VariantType type; - - /** - * Get the isDefault property: Is this the default variant. - * - * @return the isDefault value. - */ - public Boolean isDefault() { - return this.isDefault; - } - - /** - * Set the isDefault property: Is this the default variant. - * - * @param isDefault the isDefault value to set. - * @return the CreateEndpointVariantRequest object itself. - */ - public CreateEndpointVariantRequest withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; - return this; - } - - /** - * Get the trafficPercentile property: The amount of traffic variant receives. - * - * @return the trafficPercentile value. - */ - public Float trafficPercentile() { - return this.trafficPercentile; - } - - /** - * Set the trafficPercentile property: The amount of traffic variant receives. - * - * @param trafficPercentile the trafficPercentile value to set. - * @return the CreateEndpointVariantRequest object itself. - */ - public CreateEndpointVariantRequest withTrafficPercentile(Float trafficPercentile) { - this.trafficPercentile = trafficPercentile; - return this; - } - - /** - * Get the type property: The type of the variant. - * - * @return the type value. - */ - public VariantType type() { - return this.type; - } - - /** - * Set the type property: The type of the variant. - * - * @param type the type value to set. - * @return the CreateEndpointVariantRequest object itself. - */ - public CreateEndpointVariantRequest withType(VariantType type) { - this.type = type; - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withKvTags(Map kvTags) { - super.withKvTags(kvTags); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withKeys(CreateServiceRequestKeys keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withEnvironmentImageRequest( - CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - super.withEnvironmentImageRequest(environmentImageRequest); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateEndpointVariantRequest withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequest.java deleted file mode 100644 index 8d15b962c8be..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequest.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The base class for creating a service. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = CreateServiceRequest.class) -@JsonTypeName("CreateServiceRequest") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ACI", value = AciServiceCreateRequest.class), - @JsonSubTypes.Type(name = "Custom", value = CreateEndpointVariantRequest.class) -}) -@Fluent -public class CreateServiceRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateServiceRequest.class); - - /* - * The description of the service. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The service tag dictionary. Tags are mutable. - */ - @JsonProperty(value = "kvTags") - private Map kvTags; - - /* - * The service properties dictionary. Properties are immutable. - */ - @JsonProperty(value = "properties") - private Map properties; - - /* - * The authentication keys. - */ - @JsonProperty(value = "keys") - private CreateServiceRequestKeys keys; - - /* - * The Environment, models and assets needed for inferencing. - */ - @JsonProperty(value = "environmentImageRequest") - private CreateServiceRequestEnvironmentImageRequest environmentImageRequest; - - /* - * The name of the Azure location/region. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Get the description property: The description of the service. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the service. - * - * @param description the description value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the kvTags property: The service tag dictionary. Tags are mutable. - * - * @return the kvTags value. - */ - public Map kvTags() { - return this.kvTags; - } - - /** - * Set the kvTags property: The service tag dictionary. Tags are mutable. - * - * @param kvTags the kvTags value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withKvTags(Map kvTags) { - this.kvTags = kvTags; - return this; - } - - /** - * Get the properties property: The service properties dictionary. Properties are immutable. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: The service properties dictionary. Properties are immutable. - * - * @param properties the properties value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the keys property: The authentication keys. - * - * @return the keys value. - */ - public CreateServiceRequestKeys keys() { - return this.keys; - } - - /** - * Set the keys property: The authentication keys. - * - * @param keys the keys value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withKeys(CreateServiceRequestKeys keys) { - this.keys = keys; - return this; - } - - /** - * Get the environmentImageRequest property: The Environment, models and assets needed for inferencing. - * - * @return the environmentImageRequest value. - */ - public CreateServiceRequestEnvironmentImageRequest environmentImageRequest() { - return this.environmentImageRequest; - } - - /** - * Set the environmentImageRequest property: The Environment, models and assets needed for inferencing. - * - * @param environmentImageRequest the environmentImageRequest value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withEnvironmentImageRequest( - CreateServiceRequestEnvironmentImageRequest environmentImageRequest) { - this.environmentImageRequest = environmentImageRequest; - return this; - } - - /** - * Get the location property: The name of the Azure location/region. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The name of the Azure location/region. - * - * @param location the location value to set. - * @return the CreateServiceRequest object itself. - */ - public CreateServiceRequest withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keys() != null) { - keys().validate(); - } - if (environmentImageRequest() != null) { - environmentImageRequest().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestEnvironmentImageRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestEnvironmentImageRequest.java deleted file mode 100644 index 8763b677c488..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestEnvironmentImageRequest.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The Environment, models and assets needed for inferencing. */ -@Immutable -public final class CreateServiceRequestEnvironmentImageRequest extends EnvironmentImageRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateServiceRequestEnvironmentImageRequest.class); - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withDriverProgram(String driverProgram) { - super.withDriverProgram(driverProgram); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withAssets(List assets) { - super.withAssets(assets); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withModelIds(List modelIds) { - super.withModelIds(modelIds); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withModels(List models) { - super.withModels(models); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withEnvironment(EnvironmentImageRequestEnvironment environment) { - super.withEnvironment(environment); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestEnvironmentImageRequest withEnvironmentReference( - EnvironmentImageRequestEnvironmentReference environmentReference) { - super.withEnvironmentReference(environmentReference); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CredentialsType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CredentialsType.java new file mode 100644 index 000000000000..c1b241e73ce4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CredentialsType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for CredentialsType. */ +public final class CredentialsType extends ExpandableStringEnum { + /** Static value AccountKey for CredentialsType. */ + public static final CredentialsType ACCOUNT_KEY = fromString("AccountKey"); + + /** Static value Certificate for CredentialsType. */ + public static final CredentialsType CERTIFICATE = fromString("Certificate"); + + /** Static value None for CredentialsType. */ + public static final CredentialsType NONE = fromString("None"); + + /** Static value Sas for CredentialsType. */ + public static final CredentialsType SAS = fromString("Sas"); + + /** Static value ServicePrincipal for CredentialsType. */ + public static final CredentialsType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); + + /** Static value SqlAdmin for CredentialsType. */ + public static final CredentialsType SQL_ADMIN = fromString("SqlAdmin"); + + /** + * Creates or finds a CredentialsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding CredentialsType. + */ + @JsonCreator + public static CredentialsType fromString(String name) { + return fromString(name, CredentialsType.class); + } + + /** @return known CredentialsType values. */ + public static Collection values() { + return values(CredentialsType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Cron.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Cron.java new file mode 100644 index 000000000000..50c2a5fa9323 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Cron.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The workflow trigger cron for ComputeStartStop schedule type. */ +@Fluent +public final class Cron { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Cron.class); + + /* + * The start time. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /* + * The time zone. + */ + @JsonProperty(value = "timeZone") + private String timeZone; + + /* + * The cron expression. + */ + @JsonProperty(value = "expression") + private String expression; + + /** + * Get the startTime property: The start time. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time. + * + * @param startTime the startTime value to set. + * @return the Cron object itself. + */ + public Cron withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the timeZone property: The time zone. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: The time zone. + * + * @param timeZone the timeZone value to set. + * @return the Cron object itself. + */ + public Cron withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the expression property: The cron expression. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: The cron expression. + * + * @param expression the expression value to set. + * @return the Cron object itself. + */ + public Cron withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CsvExportSummary.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CsvExportSummary.java new file mode 100644 index 000000000000..057a3d1d1a80 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CsvExportSummary.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The CsvExportSummary model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("CSV") +@Immutable +public final class CsvExportSummary extends ExportSummaryInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsvExportSummary.class); + + /* + * The container name to which the labels will be exported. + */ + @JsonProperty(value = "containerName", access = JsonProperty.Access.WRITE_ONLY) + private String containerName; + + /* + * The output path where the labels will be exported. + */ + @JsonProperty(value = "snapshotPath", access = JsonProperty.Access.WRITE_ONLY) + private String snapshotPath; + + /** + * Get the containerName property: The container name to which the labels will be exported. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Get the snapshotPath property: The output path where the labels will be exported. + * + * @return the snapshotPath value. + */ + public String snapshotPath() { + return this.snapshotPath; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataBindingMode.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataBindingMode.java new file mode 100644 index 000000000000..0ed16f917c3a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataBindingMode.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DataBindingMode. */ +public final class DataBindingMode extends ExpandableStringEnum { + /** Static value Mount for DataBindingMode. */ + public static final DataBindingMode MOUNT = fromString("Mount"); + + /** Static value Download for DataBindingMode. */ + public static final DataBindingMode DOWNLOAD = fromString("Download"); + + /** Static value Upload for DataBindingMode. */ + public static final DataBindingMode UPLOAD = fromString("Upload"); + + /** + * Creates or finds a DataBindingMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataBindingMode. + */ + @JsonCreator + public static DataBindingMode fromString(String name) { + return fromString(name, DataBindingMode.class); + } + + /** @return known DataBindingMode values. */ + public static Collection values() { + return values(DataBindingMode.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainer.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainer.java new file mode 100644 index 000000000000..f5d2ceea848d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainer.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Container for data asset versions. */ +@Fluent +public final class DataContainer { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataContainer.class); + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the DataContainer object itself. + */ + public DataContainer withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the DataContainer object itself. + */ + public DataContainer withProperties(Map properties) { + this.properties = properties; + 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 DataContainer object itself. + */ + public DataContainer withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainerResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainerResource.java new file mode 100644 index 000000000000..f42412203360 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainerResource.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataContainerResourceInner; + +/** An immutable client-side representation of DataContainerResource. */ +public interface DataContainerResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + DataContainer properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.DataContainerResourceInner object. + * + * @return the inner object. + */ + DataContainerResourceInner innerModel(); + + /** The entirety of the DataContainerResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The DataContainerResource definition stages. */ + interface DefinitionStages { + /** The first stage of the DataContainerResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the DataContainerResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the DataContainerResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(DataContainer properties); + } + /** + * The stage of the DataContainerResource 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. + */ + DataContainerResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DataContainerResource create(Context context); + } + } + /** + * Begins update for the DataContainerResource resource. + * + * @return the stage of resource update. + */ + DataContainerResource.Update update(); + + /** The template for DataContainerResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DataContainerResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DataContainerResource apply(Context context); + } + /** The DataContainerResource update stages. */ + interface UpdateStages { + /** The stage of the DataContainerResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(DataContainer properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DataContainerResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DataContainerResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainerResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainerResourceArmPaginatedResult.java new file mode 100644 index 000000000000..021dc67650e4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainerResourceArmPaginatedResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataContainerResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of DataContainer entities. */ +@Fluent +public final class DataContainerResourceArmPaginatedResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataContainerResourceArmPaginatedResult.class); + + /* + * The link to the next page of DataContainer objects. If null, there are + * no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type DataContainer. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of DataContainer 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 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; + } + + /** + * Get the value property: An array of objects of type DataContainer. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainers.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainers.java new file mode 100644 index 000000000000..1a59c3f6e456 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataContainers.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 DataContainers. */ +public interface DataContainers { + /** + * 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context); + + /** + * Delete container. + * + * @param name Container 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. + */ + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get container. + * + * @param name Container 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 container. + */ + DataContainerResource get(String name, String resourceGroupName, String workspaceName); + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * 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. + */ + DataContainerResource getById(String id); + + /** + * Get container. + * + * @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 container. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete 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. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DataContainerResource resource. + * + * @param name resource name. + * @return the first stage of the new DataContainerResource definition. + */ + DataContainerResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataFactory.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataFactory.java index 3047134d8463..c26cd3e50e00 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataFactory.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataFactory.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.machinelearningservices.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -13,7 +13,7 @@ /** A DataFactory compute. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("DataFactory") -@Immutable +@Fluent public final class DataFactory extends Compute { @JsonIgnore private final ClientLogger logger = new ClientLogger(DataFactory.class); diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataPathAssetReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataPathAssetReference.java new file mode 100644 index 000000000000..e5d12146c285 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataPathAssetReference.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Reference to an asset via its path in a datastore. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") +@JsonTypeName("DataPath") +@Fluent +public final class DataPathAssetReference extends AssetReferenceBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataPathAssetReference.class); + + /* + * ARM resource ID of the datastore where the asset is located. + */ + @JsonProperty(value = "datastoreId") + private String datastoreId; + + /* + * The path of the file/directory in the datastore. + */ + @JsonProperty(value = "path") + private String path; + + /** + * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. + * + * @return the datastoreId value. + */ + public String datastoreId() { + return this.datastoreId; + } + + /** + * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. + * + * @param datastoreId the datastoreId value to set. + * @return the DataPathAssetReference object itself. + */ + public DataPathAssetReference withDatastoreId(String datastoreId) { + this.datastoreId = datastoreId; + return this; + } + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersion.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersion.java new file mode 100644 index 000000000000..c4816636473d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersion.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Data asset version details. */ +@Fluent +public final class DataVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataVersion.class); + + /* + * The Format of dataset. + */ + @JsonProperty(value = "datasetType") + private DatasetType datasetType; + + /* + * ARM resource ID of the datastore where the asset is located. + */ + @JsonProperty(value = "datastoreId") + private String datastoreId; + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * If the name version are system generated (anonymous registration). + */ + @JsonProperty(value = "isAnonymous") + private Boolean isAnonymous; + + /* + * The path of the file/directory in the datastore. + */ + @JsonProperty(value = "path", required = true) + private String path; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the datasetType property: The Format of dataset. + * + * @return the datasetType value. + */ + public DatasetType datasetType() { + return this.datasetType; + } + + /** + * Set the datasetType property: The Format of dataset. + * + * @param datasetType the datasetType value to set. + * @return the DataVersion object itself. + */ + public DataVersion withDatasetType(DatasetType datasetType) { + this.datasetType = datasetType; + return this; + } + + /** + * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. + * + * @return the datastoreId value. + */ + public String datastoreId() { + return this.datastoreId; + } + + /** + * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. + * + * @param datastoreId the datastoreId value to set. + * @return the DataVersion object itself. + */ + public DataVersion withDatastoreId(String datastoreId) { + this.datastoreId = datastoreId; + return this; + } + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the DataVersion object itself. + */ + public DataVersion withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the isAnonymous property: If the name version are system generated (anonymous registration). + * + * @return the isAnonymous value. + */ + public Boolean isAnonymous() { + return this.isAnonymous; + } + + /** + * Set the isAnonymous property: If the name version are system generated (anonymous registration). + * + * @param isAnonymous the isAnonymous value to set. + * @return the DataVersion object itself. + */ + public DataVersion withIsAnonymous(Boolean isAnonymous) { + this.isAnonymous = isAnonymous; + return this; + } + + /** + * 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 DataVersion object itself. + */ + public DataVersion withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the DataVersion object itself. + */ + public DataVersion withProperties(Map properties) { + this.properties = properties; + 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 DataVersion object itself. + */ + public DataVersion withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (path() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property path in model DataVersion")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersionResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersionResource.java new file mode 100644 index 000000000000..047c6fd98f1f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersionResource.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataVersionResourceInner; + +/** An immutable client-side representation of DataVersionResource. */ +public interface DataVersionResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + DataVersion properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.DataVersionResourceInner object. + * + * @return the inner object. + */ + DataVersionResourceInner innerModel(); + + /** The entirety of the DataVersionResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The DataVersionResource definition stages. */ + interface DefinitionStages { + /** The first stage of the DataVersionResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the DataVersionResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies name, resourceGroupName, workspaceName. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingData(String name, String resourceGroupName, String workspaceName); + } + /** The stage of the DataVersionResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(DataVersion properties); + } + /** + * The stage of the DataVersionResource 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. + */ + DataVersionResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DataVersionResource create(Context context); + } + } + /** + * Begins update for the DataVersionResource resource. + * + * @return the stage of resource update. + */ + DataVersionResource.Update update(); + + /** The template for DataVersionResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DataVersionResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DataVersionResource apply(Context context); + } + /** The DataVersionResource update stages. */ + interface UpdateStages { + /** The stage of the DataVersionResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(DataVersion properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DataVersionResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DataVersionResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersionResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersionResourceArmPaginatedResult.java new file mode 100644 index 000000000000..5b1cc0f71731 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersionResourceArmPaginatedResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DataVersionResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of DataVersion entities. */ +@Fluent +public final class DataVersionResourceArmPaginatedResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataVersionResourceArmPaginatedResult.class); + + /* + * The link to the next page of DataVersion objects. If null, there are no + * additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type DataVersion. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of DataVersion 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 DataVersion objects. If null, there are no additional + * pages. + * + * @param nextLink the nextLink value to set. + * @return the DataVersionResourceArmPaginatedResult object itself. + */ + public DataVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type DataVersion. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type DataVersion. + * + * @param value the value value to set. + * @return the DataVersionResourceArmPaginatedResult object itself. + */ + public DataVersionResourceArmPaginatedResult 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()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersions.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersions.java new file mode 100644 index 000000000000..a69552c07501 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DataVersions.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 DataVersions. */ +public interface DataVersions { + /** + * List data versions. + * + * @param name Data 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 DataVersion entities. + */ + PagedIterable list(String name, String resourceGroupName, String workspaceName); + + /** + * List data versions. + * + * @param name Data name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=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 paginated list of DataVersion entities. + */ + PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + String tags, + Context context); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 delete(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + DataVersionResource get(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @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 version. + */ + DataVersionResource getById(String id); + + /** + * Get version. + * + * @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 version. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @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 version. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DataVersionResource resource. + * + * @param name resource name. + * @return the first stage of the new DataVersionResource definition. + */ + DataVersionResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetExportSummary.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetExportSummary.java new file mode 100644 index 000000000000..d5e8e8445303 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetExportSummary.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The DatasetExportSummary model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("Dataset") +@Immutable +public final class DatasetExportSummary extends ExportSummaryInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatasetExportSummary.class); + + /* + * The unique name of the labeled data asset. + */ + @JsonProperty(value = "labeledAssetName", access = JsonProperty.Access.WRITE_ONLY) + private String labeledAssetName; + + /** + * Get the labeledAssetName property: The unique name of the labeled data asset. + * + * @return the labeledAssetName value. + */ + public String labeledAssetName() { + return this.labeledAssetName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetReference.java deleted file mode 100644 index 74a05061443b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetReference.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The dataset reference object. */ -@Fluent -public final class DatasetReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatasetReference.class); - - /* - * The name of the dataset reference. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The id of the dataset reference. - */ - @JsonProperty(value = "id") - private String id; - - /** - * 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 id of the dataset reference. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetType.java new file mode 100644 index 000000000000..4c807f2adb05 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatasetType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DatasetType. */ +public final class DatasetType extends ExpandableStringEnum { + /** Static value Simple for DatasetType. */ + public static final DatasetType SIMPLE = fromString("Simple"); + + /** Static value Dataflow for DatasetType. */ + public static final DatasetType DATAFLOW = fromString("Dataflow"); + + /** + * Creates or finds a DatasetType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DatasetType. + */ + @JsonCreator + public static DatasetType fromString(String name) { + return fromString(name, DatasetType.class); + } + + /** @return known DatasetType values. */ + public static Collection values() { + return values(DatasetType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreContents.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreContents.java new file mode 100644 index 000000000000..c4fb79b134b9 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreContents.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base definition for datastore contents configuration. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "contentsType", + defaultImpl = DatastoreContents.class) +@JsonTypeName("DatastoreContents") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AzureBlob", value = AzureBlobContents.class), + @JsonSubTypes.Type(name = "AzureDataLakeGen1", value = AzureDataLakeGen1Contents.class), + @JsonSubTypes.Type(name = "AzureDataLakeGen2", value = AzureDataLakeGen2Contents.class), + @JsonSubTypes.Type(name = "AzureFile", value = AzureFileContents.class), + @JsonSubTypes.Type(name = "AzurePostgreSql", value = AzurePostgreSqlContents.class), + @JsonSubTypes.Type(name = "AzureSqlDatabase", value = AzureSqlDatabaseContents.class), + @JsonSubTypes.Type(name = "GlusterFs", value = GlusterFsContents.class) +}) +@Immutable +public class DatastoreContents { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoreContents.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreCredentials.java new file mode 100644 index 000000000000..f279bf138ca2 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreCredentials.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base definition for datastore credentials. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "credentialsType", + defaultImpl = DatastoreCredentials.class) +@JsonTypeName("DatastoreCredentials") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AccountKey", value = AccountKeyDatastoreCredentials.class), + @JsonSubTypes.Type(name = "Certificate", value = CertificateDatastoreCredentials.class), + @JsonSubTypes.Type(name = "None", value = NoneDatastoreCredentials.class), + @JsonSubTypes.Type(name = "Sas", value = SasDatastoreCredentials.class), + @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreCredentials.class), + @JsonSubTypes.Type(name = "SqlAdmin", value = SqlAdminDatastoreCredentials.class) +}) +@Immutable +public class DatastoreCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoreCredentials.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreProperties.java new file mode 100644 index 000000000000..bd308a6dfc6e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreProperties.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Datastore definition. */ +@Fluent +public final class DatastoreProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatastoreProperties.class); + + /* + * Reference to the datastore storage contents. + */ + @JsonProperty(value = "contents", required = true) + private DatastoreContents contents; + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Whether the service has validated access to the datastore with the + * provided credentials. + */ + @JsonProperty(value = "hasBeenValidated", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasBeenValidated; + + /* + * Whether this datastore is the default for the workspace. + */ + @JsonProperty(value = "isDefault") + private Boolean isDefault; + + /* + * Information about the datastore origin, if linked. + */ + @JsonProperty(value = "linkedInfo") + private LinkedInfo linkedInfo; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the contents property: Reference to the datastore storage contents. + * + * @return the contents value. + */ + public DatastoreContents contents() { + return this.contents; + } + + /** + * Set the contents property: Reference to the datastore storage contents. + * + * @param contents the contents value to set. + * @return the DatastoreProperties object itself. + */ + public DatastoreProperties withContents(DatastoreContents contents) { + this.contents = contents; + return this; + } + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the DatastoreProperties object itself. + */ + public DatastoreProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the hasBeenValidated property: Whether the service has validated access to the datastore with the provided + * credentials. + * + * @return the hasBeenValidated value. + */ + public Boolean hasBeenValidated() { + return this.hasBeenValidated; + } + + /** + * Get the isDefault property: Whether this datastore is the default for the workspace. + * + * @return the isDefault value. + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set the isDefault property: Whether this datastore is the default for the workspace. + * + * @param isDefault the isDefault value to set. + * @return the DatastoreProperties object itself. + */ + public DatastoreProperties withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get the linkedInfo property: Information about the datastore origin, if linked. + * + * @return the linkedInfo value. + */ + public LinkedInfo linkedInfo() { + return this.linkedInfo; + } + + /** + * Set the linkedInfo property: Information about the datastore origin, if linked. + * + * @param linkedInfo the linkedInfo value to set. + * @return the DatastoreProperties object itself. + */ + public DatastoreProperties withLinkedInfo(LinkedInfo linkedInfo) { + this.linkedInfo = linkedInfo; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the DatastoreProperties object itself. + */ + public DatastoreProperties withProperties(Map properties) { + this.properties = properties; + 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 DatastoreProperties object itself. + */ + public DatastoreProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contents() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property contents in model DatastoreProperties")); + } else { + contents().validate(); + } + if (linkedInfo() != null) { + linkedInfo().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastorePropertiesResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastorePropertiesResource.java new file mode 100644 index 000000000000..9e41a5af2500 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastorePropertiesResource.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastorePropertiesResourceInner; + +/** An immutable client-side representation of DatastorePropertiesResource. */ +public interface DatastorePropertiesResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + DatastoreProperties properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.DatastorePropertiesResourceInner + * object. + * + * @return the inner object. + */ + DatastorePropertiesResourceInner innerModel(); + + /** The entirety of the DatastorePropertiesResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The DatastorePropertiesResource definition stages. */ + interface DefinitionStages { + /** The first stage of the DatastorePropertiesResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the DatastorePropertiesResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the DatastorePropertiesResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(DatastoreProperties properties); + } + /** + * The stage of the DatastorePropertiesResource 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.WithSkipValidation { + /** + * Executes the create request. + * + * @return the created resource. + */ + DatastorePropertiesResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DatastorePropertiesResource create(Context context); + } + /** The stage of the DatastorePropertiesResource definition allowing to specify skipValidation. */ + interface WithSkipValidation { + /** + * Specifies the skipValidation property: Flag to skip validation.. + * + * @param skipValidation Flag to skip validation. + * @return the next definition stage. + */ + WithCreate withSkipValidation(Boolean skipValidation); + } + } + /** + * Begins update for the DatastorePropertiesResource resource. + * + * @return the stage of resource update. + */ + DatastorePropertiesResource.Update update(); + + /** The template for DatastorePropertiesResource update. */ + interface Update extends UpdateStages.WithProperties, UpdateStages.WithSkipValidation { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DatastorePropertiesResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DatastorePropertiesResource apply(Context context); + } + /** The DatastorePropertiesResource update stages. */ + interface UpdateStages { + /** The stage of the DatastorePropertiesResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(DatastoreProperties properties); + } + /** The stage of the DatastorePropertiesResource update allowing to specify skipValidation. */ + interface WithSkipValidation { + /** + * Specifies the skipValidation property: Flag to skip validation.. + * + * @param skipValidation Flag to skip validation. + * @return the next definition stage. + */ + Update withSkipValidation(Boolean skipValidation); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DatastorePropertiesResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DatastorePropertiesResource refresh(Context context); + + /** + * Get datastore secrets. + * + * @throws com.azure.core.management.exception.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. + */ + DatastoreSecrets listSecrets(); + + /** + * Get datastore secrets. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + Response listSecretsWithResponse(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastorePropertiesResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastorePropertiesResourceArmPaginatedResult.java new file mode 100644 index 000000000000..7d16c22e108a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastorePropertiesResourceArmPaginatedResult.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastorePropertiesResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of DatastoreProperties entities. */ +@Fluent +public final class DatastorePropertiesResourceArmPaginatedResult { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(DatastorePropertiesResourceArmPaginatedResult.class); + + /* + * The link to the next page of DatastoreProperties objects. If null, there + * are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type DatastoreProperties. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of DatastoreProperties 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 DatastoreProperties objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the DatastorePropertiesResourceArmPaginatedResult object itself. + */ + public DatastorePropertiesResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type DatastoreProperties. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type DatastoreProperties. + * + * @param value the value value to set. + * @return the DatastorePropertiesResourceArmPaginatedResult object itself. + */ + public DatastorePropertiesResourceArmPaginatedResult 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()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreSecrets.java new file mode 100644 index 000000000000..caad9e31ead2 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DatastoreSecrets.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; + +/** An immutable client-side representation of DatastoreSecrets. */ +public interface DatastoreSecrets { + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner object. + * + * @return the inner object. + */ + DatastoreSecretsInner innerModel(); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Datastores.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Datastores.java new file mode 100644 index 000000000000..dd1690c98efa --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Datastores.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 Datastores. */ +public interface Datastores { + /** + * List datastores. + * + * @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 DatastoreProperties entities. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List datastores. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DatastoreProperties entities. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + Integer count, + Boolean isDefault, + List names, + String searchText, + String orderBy, + Boolean orderByAsc, + Context context); + + /** + * Delete datastore. + * + * @param name Datastore 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. + */ + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete datastore. + * + * @param name Datastore name. + * @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. + */ + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get datastore. + * + * @param name Datastore 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 datastore. + */ + DatastorePropertiesResource get(String name, String resourceGroupName, String workspaceName); + + /** + * Get datastore. + * + * @param name Datastore name. + * @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 datastore. + */ + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get datastore secrets. + * + * @param name Datastore 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 datastore secrets. + */ + DatastoreSecrets listSecrets(String name, String resourceGroupName, String workspaceName); + + /** + * Get datastore secrets. + * + * @param name Datastore name. + * @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 datastore secrets. + */ + Response listSecretsWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get datastore. + * + * @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 datastore. + */ + DatastorePropertiesResource getById(String id); + + /** + * Get datastore. + * + * @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 datastore. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete datastore. + * + * @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 datastore. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DatastorePropertiesResource resource. + * + * @param name resource name. + * @return the first stage of the new DatastorePropertiesResource definition. + */ + DatastorePropertiesResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DaysOfWeek.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DaysOfWeek.java new file mode 100644 index 000000000000..2da4abbeee9d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DaysOfWeek.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for DaysOfWeek. */ +public enum DaysOfWeek { + /** Enum value Sunday. */ + SUNDAY("Sunday"), + + /** Enum value Monday. */ + MONDAY("Monday"), + + /** Enum value Tuesday. */ + TUESDAY("Tuesday"), + + /** Enum value Wednesday. */ + WEDNESDAY("Wednesday"), + + /** Enum value Thursday. */ + THURSDAY("Thursday"), + + /** Enum value Friday. */ + FRIDAY("Friday"), + + /** Enum value Saturday. */ + SATURDAY("Saturday"); + + /** The actual serialized value for a DaysOfWeek instance. */ + private final String value; + + DaysOfWeek(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DaysOfWeek instance. + * + * @param value the serialized value to parse. + * @return the parsed DaysOfWeek object, or null if unable to parse. + */ + @JsonCreator + public static DaysOfWeek fromString(String value) { + DaysOfWeek[] items = DaysOfWeek.values(); + for (DaysOfWeek item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentLogs.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentLogs.java new file mode 100644 index 000000000000..5f17d9d4066d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentLogs.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.DeploymentLogsInner; + +/** An immutable client-side representation of DeploymentLogs. */ +public interface DeploymentLogs { + /** + * Gets the content property: The retrieved online deployment logs. + * + * @return the content value. + */ + String content(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.DeploymentLogsInner object. + * + * @return the inner object. + */ + DeploymentLogsInner innerModel(); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentLogsRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentLogsRequest.java new file mode 100644 index 000000000000..ccdfa2250c56 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentLogsRequest.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DeploymentLogsRequest model. */ +@Fluent +public final class DeploymentLogsRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentLogsRequest.class); + + /* + * The type of container to retrieve logs from. + */ + @JsonProperty(value = "containerType") + private ContainerType containerType; + + /* + * The maximum number of lines to tail. + */ + @JsonProperty(value = "tail") + private Integer tail; + + /** + * Get the containerType property: The type of container to retrieve logs from. + * + * @return the containerType value. + */ + public ContainerType containerType() { + return this.containerType; + } + + /** + * Set the containerType property: The type of container to retrieve logs from. + * + * @param containerType the containerType value to set. + * @return the DeploymentLogsRequest object itself. + */ + public DeploymentLogsRequest withContainerType(ContainerType containerType) { + this.containerType = containerType; + return this; + } + + /** + * Get the tail property: The maximum number of lines to tail. + * + * @return the tail value. + */ + public Integer tail() { + return this.tail; + } + + /** + * Set the tail property: The maximum number of lines to tail. + * + * @param tail the tail value to set. + * @return the DeploymentLogsRequest object itself. + */ + public DeploymentLogsRequest withTail(Integer tail) { + this.tail = tail; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentProvisioningState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentProvisioningState.java new file mode 100644 index 000000000000..3e576770c0d8 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentProvisioningState.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DeploymentProvisioningState. */ +public final class DeploymentProvisioningState extends ExpandableStringEnum { + /** Static value Creating for DeploymentProvisioningState. */ + public static final DeploymentProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for DeploymentProvisioningState. */ + public static final DeploymentProvisioningState DELETING = fromString("Deleting"); + + /** Static value Scaling for DeploymentProvisioningState. */ + public static final DeploymentProvisioningState SCALING = fromString("Scaling"); + + /** Static value Updating for DeploymentProvisioningState. */ + public static final DeploymentProvisioningState UPDATING = fromString("Updating"); + + /** Static value Succeeded for DeploymentProvisioningState. */ + public static final DeploymentProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for DeploymentProvisioningState. */ + public static final DeploymentProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for DeploymentProvisioningState. */ + public static final DeploymentProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates or finds a DeploymentProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentProvisioningState. + */ + @JsonCreator + public static DeploymentProvisioningState fromString(String name) { + return fromString(name, DeploymentProvisioningState.class); + } + + /** @return known DeploymentProvisioningState values. */ + public static Collection values() { + return values(DeploymentProvisioningState.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentType.java deleted file mode 100644 index 13d771f61284..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DeploymentType.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DeploymentType. */ -public final class DeploymentType extends ExpandableStringEnum { - /** Static value GRPCRealtimeEndpoint for DeploymentType. */ - public static final DeploymentType GRPCREALTIME_ENDPOINT = fromString("GRPCRealtimeEndpoint"); - - /** Static value HttpRealtimeEndpoint for DeploymentType. */ - public static final DeploymentType HTTP_REALTIME_ENDPOINT = fromString("HttpRealtimeEndpoint"); - - /** Static value Batch for DeploymentType. */ - public static final DeploymentType BATCH = fromString("Batch"); - - /** - * Creates or finds a DeploymentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentType. - */ - @JsonCreator - public static DeploymentType fromString(String name) { - return fromString(name, DeploymentType.class); - } - - /** @return known DeploymentType values. */ - public static Collection values() { - return values(DeploymentType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DistributionConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DistributionConfiguration.java new file mode 100644 index 000000000000..101aa807f145 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DistributionConfiguration.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base definition for job distribution configuration. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "distributionType", + defaultImpl = DistributionConfiguration.class) +@JsonTypeName("DistributionConfiguration") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Mpi", value = Mpi.class), + @JsonSubTypes.Type(name = "PyTorch", value = PyTorch.class), + @JsonSubTypes.Type(name = "TensorFlow", value = TensorFlow.class) +}) +@Immutable +public class DistributionConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DistributionConfiguration.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DistributionType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DistributionType.java new file mode 100644 index 000000000000..599f5ec29068 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DistributionType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DistributionType. */ +public final class DistributionType extends ExpandableStringEnum { + /** Static value PyTorch for DistributionType. */ + public static final DistributionType PY_TORCH = fromString("PyTorch"); + + /** Static value TensorFlow for DistributionType. */ + public static final DistributionType TENSOR_FLOW = fromString("TensorFlow"); + + /** Static value Mpi for DistributionType. */ + public static final DistributionType MPI = fromString("Mpi"); + + /** + * Creates or finds a DistributionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DistributionType. + */ + @JsonCreator + public static DistributionType fromString(String name) { + return fromString(name, DistributionType.class); + } + + /** @return known DistributionType values. */ + public static Collection values() { + return values(DistributionType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerBuild.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerBuild.java new file mode 100644 index 000000000000..3e3e9bfb1781 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerBuild.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Class to represent configuration settings for Docker Build. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dockerSpecificationType") +@JsonTypeName("Build") +@Fluent +public final class DockerBuild extends DockerSpecification { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DockerBuild.class); + + /* + * Path to a snapshot of the Docker Context. This property is only valid if + * Dockerfile is specified. + * The path is relative to the asset path which must contain a single Blob + * URI value. + * + */ + @JsonProperty(value = "context") + private String context; + + /* + * Docker command line instructions to assemble an image. + * + */ + @JsonProperty(value = "dockerfile", required = true) + private String dockerfile; + + /** + * Get the context property: Path to a snapshot of the Docker Context. This property is only valid if Dockerfile is + * specified. The path is relative to the asset path which must contain a single Blob URI value. <seealso + * href="https://docs.docker.com/engine/context/working-with-contexts/" />. + * + * @return the context value. + */ + public String context() { + return this.context; + } + + /** + * Set the context property: Path to a snapshot of the Docker Context. This property is only valid if Dockerfile is + * specified. The path is relative to the asset path which must contain a single Blob URI value. <seealso + * href="https://docs.docker.com/engine/context/working-with-contexts/" />. + * + * @param context the context value to set. + * @return the DockerBuild object itself. + */ + public DockerBuild withContext(String context) { + this.context = context; + return this; + } + + /** + * Get the dockerfile property: Docker command line instructions to assemble an image. <seealso + * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#dockerfile-advanced-environments" />. + * + * @return the dockerfile value. + */ + public String dockerfile() { + return this.dockerfile; + } + + /** + * Set the dockerfile property: Docker command line instructions to assemble an image. <seealso + * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#dockerfile-advanced-environments" />. + * + * @param dockerfile the dockerfile value to set. + * @return the DockerBuild object itself. + */ + public DockerBuild withDockerfile(String dockerfile) { + this.dockerfile = dockerfile; + return this; + } + + /** {@inheritDoc} */ + @Override + public DockerBuild withPlatform(DockerImagePlatform platform) { + super.withPlatform(platform); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (dockerfile() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property dockerfile in model DockerBuild")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerImage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerImage.java new file mode 100644 index 000000000000..30e256452ae5 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerImage.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Class to represent configuration settings for Docker Build. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dockerSpecificationType") +@JsonTypeName("Image") +@Fluent +public final class DockerImage extends DockerSpecification { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DockerImage.class); + + /* + * Image name of a custom base image. + * + */ + @JsonProperty(value = "dockerImageUri", required = true) + private String dockerImageUri; + + /** + * Get the dockerImageUri property: Image name of a custom base image. <seealso + * href="https://docs.microsoft.com/en-us/azure/machine-learning" + + "/how-to-deploy-custom-docker-image#use-a-custom-base-image" + * />. + * + * @return the dockerImageUri value. + */ + public String dockerImageUri() { + return this.dockerImageUri; + } + + /** + * Set the dockerImageUri property: Image name of a custom base image. <seealso + * href="https://docs.microsoft.com/en-us/azure/machine-learning" + + "/how-to-deploy-custom-docker-image#use-a-custom-base-image" + * />. + * + * @param dockerImageUri the dockerImageUri value to set. + * @return the DockerImage object itself. + */ + public DockerImage withDockerImageUri(String dockerImageUri) { + this.dockerImageUri = dockerImageUri; + return this; + } + + /** {@inheritDoc} */ + @Override + public DockerImage withPlatform(DockerImagePlatform platform) { + super.withPlatform(platform); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (dockerImageUri() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property dockerImageUri in model DockerImage")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerImagePlatform.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerImagePlatform.java new file mode 100644 index 000000000000..7ca174343142 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerImagePlatform.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The DockerImagePlatform model. */ +@Fluent +public final class DockerImagePlatform { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DockerImagePlatform.class); + + /* + * The OS type the Environment. + */ + @JsonProperty(value = "operatingSystemType") + private OperatingSystemType operatingSystemType; + + /** + * Get the operatingSystemType property: The OS type the Environment. + * + * @return the operatingSystemType value. + */ + public OperatingSystemType operatingSystemType() { + return this.operatingSystemType; + } + + /** + * Set the operatingSystemType property: The OS type the Environment. + * + * @param operatingSystemType the operatingSystemType value to set. + * @return the DockerImagePlatform object itself. + */ + public DockerImagePlatform withOperatingSystemType(OperatingSystemType operatingSystemType) { + this.operatingSystemType = operatingSystemType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerSpecification.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerSpecification.java new file mode 100644 index 000000000000..134185d825ac --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerSpecification.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Configuration settings for Docker. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "dockerSpecificationType", + defaultImpl = DockerSpecification.class) +@JsonTypeName("DockerSpecification") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Build", value = DockerBuild.class), + @JsonSubTypes.Type(name = "Image", value = DockerImage.class) +}) +@Fluent +public class DockerSpecification { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DockerSpecification.class); + + /* + * The platform information of the docker image. + */ + @JsonProperty(value = "platform") + private DockerImagePlatform platform; + + /** + * Get the platform property: The platform information of the docker image. + * + * @return the platform value. + */ + public DockerImagePlatform platform() { + return this.platform; + } + + /** + * Set the platform property: The platform information of the docker image. + * + * @param platform the platform value to set. + * @return the DockerSpecification object itself. + */ + public DockerSpecification withPlatform(DockerImagePlatform platform) { + this.platform = platform; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (platform() != null) { + platform().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerSpecificationType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerSpecificationType.java new file mode 100644 index 000000000000..f415b3b0500a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/DockerSpecificationType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DockerSpecificationType. */ +public final class DockerSpecificationType extends ExpandableStringEnum { + /** Static value Build for DockerSpecificationType. */ + public static final DockerSpecificationType BUILD = fromString("Build"); + + /** Static value Image for DockerSpecificationType. */ + public static final DockerSpecificationType IMAGE = fromString("Image"); + + /** + * Creates or finds a DockerSpecificationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DockerSpecificationType. + */ + @JsonCreator + public static DockerSpecificationType fromString(String name) { + return fromString(name, DockerSpecificationType.class); + } + + /** @return known DockerSpecificationType values. */ + public static Collection values() { + return values(DockerSpecificationType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EarlyTerminationPolicy.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EarlyTerminationPolicy.java new file mode 100644 index 000000000000..9443d58070d1 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EarlyTerminationPolicy.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Early termination policies enable canceling poor-performing runs before they complete. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "policyType", + defaultImpl = EarlyTerminationPolicy.class) +@JsonTypeName("EarlyTerminationPolicy") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Bandit", value = BanditPolicy.class), + @JsonSubTypes.Type(name = "MedianStopping", value = MedianStoppingPolicy.class), + @JsonSubTypes.Type(name = "TruncationSelection", value = TruncationSelectionPolicy.class) +}) +@Fluent +public class EarlyTerminationPolicy { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EarlyTerminationPolicy.class); + + /* + * Number of intervals by which to delay the first evaluation. + */ + @JsonProperty(value = "delayEvaluation") + private Integer delayEvaluation; + + /* + * Interval (number of runs) between policy evaluations. + */ + @JsonProperty(value = "evaluationInterval") + private Integer evaluationInterval; + + /** + * Get the delayEvaluation property: Number of intervals by which to delay the first evaluation. + * + * @return the delayEvaluation value. + */ + public Integer delayEvaluation() { + return this.delayEvaluation; + } + + /** + * Set the delayEvaluation property: Number of intervals by which to delay the first evaluation. + * + * @param delayEvaluation the delayEvaluation value to set. + * @return the EarlyTerminationPolicy object itself. + */ + public EarlyTerminationPolicy withDelayEvaluation(Integer delayEvaluation) { + this.delayEvaluation = delayEvaluation; + return this; + } + + /** + * Get the evaluationInterval property: Interval (number of runs) between policy evaluations. + * + * @return the evaluationInterval value. + */ + public Integer evaluationInterval() { + return this.evaluationInterval; + } + + /** + * Set the evaluationInterval property: Interval (number of runs) between policy evaluations. + * + * @param evaluationInterval the evaluationInterval value to set. + * @return the EarlyTerminationPolicy object itself. + */ + public EarlyTerminationPolicy withEvaluationInterval(Integer evaluationInterval) { + this.evaluationInterval = evaluationInterval; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EarlyTerminationPolicyType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EarlyTerminationPolicyType.java new file mode 100644 index 000000000000..77e5010573dc --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EarlyTerminationPolicyType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EarlyTerminationPolicyType. */ +public final class EarlyTerminationPolicyType extends ExpandableStringEnum { + /** Static value Bandit for EarlyTerminationPolicyType. */ + public static final EarlyTerminationPolicyType BANDIT = fromString("Bandit"); + + /** Static value MedianStopping for EarlyTerminationPolicyType. */ + public static final EarlyTerminationPolicyType MEDIAN_STOPPING = fromString("MedianStopping"); + + /** Static value TruncationSelection for EarlyTerminationPolicyType. */ + public static final EarlyTerminationPolicyType TRUNCATION_SELECTION = fromString("TruncationSelection"); + + /** + * Creates or finds a EarlyTerminationPolicyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EarlyTerminationPolicyType. + */ + @JsonCreator + public static EarlyTerminationPolicyType fromString(String name) { + return fromString(name, EarlyTerminationPolicyType.class); + } + + /** @return known EarlyTerminationPolicyType values. */ + public static Collection values() { + return values(EarlyTerminationPolicyType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperties.java deleted file mode 100644 index 82adb616d98b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EncryptionProperties.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The EncryptionProperties model. */ -@Fluent -public class EncryptionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionProperties.class); - - /* - * vault base Url - */ - @JsonProperty(value = "vaultBaseUrl", required = true) - private String vaultBaseUrl; - - /* - * Encryption Key name - */ - @JsonProperty(value = "keyName", required = true) - private String keyName; - - /* - * Encryption Key Version - */ - @JsonProperty(value = "keyVersion", required = true) - private String keyVersion; - - /** - * Get the vaultBaseUrl property: vault base Url. - * - * @return the vaultBaseUrl value. - */ - public String vaultBaseUrl() { - return this.vaultBaseUrl; - } - - /** - * Set the vaultBaseUrl property: vault base Url. - * - * @param vaultBaseUrl the vaultBaseUrl value to set. - * @return the EncryptionProperties object itself. - */ - public EncryptionProperties withVaultBaseUrl(String vaultBaseUrl) { - this.vaultBaseUrl = vaultBaseUrl; - return this; - } - - /** - * Get the keyName property: Encryption Key name. - * - * @return the keyName value. - */ - public String keyName() { - return this.keyName; - } - - /** - * Set the keyName property: Encryption Key name. - * - * @param keyName the keyName value to set. - * @return the EncryptionProperties object itself. - */ - public EncryptionProperties withKeyName(String keyName) { - this.keyName = keyName; - return this; - } - - /** - * Get the keyVersion property: Encryption Key Version. - * - * @return the keyVersion value. - */ - public String keyVersion() { - return this.keyVersion; - } - - /** - * Set the keyVersion property: Encryption Key Version. - * - * @param keyVersion the keyVersion value to set. - * @return the EncryptionProperties object itself. - */ - public EncryptionProperties withKeyVersion(String keyVersion) { - this.keyVersion = keyVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vaultBaseUrl() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property vaultBaseUrl in model EncryptionProperties")); - } - if (keyName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property keyName in model EncryptionProperties")); - } - if (keyVersion() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property keyVersion in model EncryptionProperties")); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthKeys.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthKeys.java new file mode 100644 index 000000000000..707ef836fd39 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthKeys.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner; + +/** An immutable client-side representation of EndpointAuthKeys. */ +public interface EndpointAuthKeys { + /** + * Gets the primaryKey property: The primary key. + * + * @return the primaryKey value. + */ + String primaryKey(); + + /** + * Gets the secondaryKey property: The secondary key. + * + * @return the secondaryKey value. + */ + String secondaryKey(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthKeysInner object. + * + * @return the inner object. + */ + EndpointAuthKeysInner innerModel(); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthMode.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthMode.java new file mode 100644 index 000000000000..b3e32f7125df --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthMode.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EndpointAuthMode. */ +public final class EndpointAuthMode extends ExpandableStringEnum { + /** Static value AMLToken for EndpointAuthMode. */ + public static final EndpointAuthMode AMLTOKEN = fromString("AMLToken"); + + /** Static value Key for EndpointAuthMode. */ + public static final EndpointAuthMode KEY = fromString("Key"); + + /** Static value AADToken for EndpointAuthMode. */ + public static final EndpointAuthMode AADTOKEN = fromString("AADToken"); + + /** + * Creates or finds a EndpointAuthMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointAuthMode. + */ + @JsonCreator + public static EndpointAuthMode fromString(String name) { + return fromString(name, EndpointAuthMode.class); + } + + /** @return known EndpointAuthMode values. */ + public static Collection values() { + return values(EndpointAuthMode.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthToken.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthToken.java new file mode 100644 index 000000000000..6c88e5f3deb3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointAuthToken.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthTokenInner; + +/** An immutable client-side representation of EndpointAuthToken. */ +public interface EndpointAuthToken { + /** + * Gets the accessToken property: Access token. + * + * @return the accessToken value. + */ + String accessToken(); + + /** + * Gets the expiryTimeUtc property: Access token expiry time (UTC). + * + * @return the expiryTimeUtc value. + */ + Long expiryTimeUtc(); + + /** + * Gets the refreshAfterTimeUtc property: Refresh access token after time (UTC). + * + * @return the refreshAfterTimeUtc value. + */ + Long refreshAfterTimeUtc(); + + /** + * Gets the tokenType property: Access token type. + * + * @return the tokenType value. + */ + String tokenType(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.EndpointAuthTokenInner object. + * + * @return the inner object. + */ + EndpointAuthTokenInner innerModel(); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointComputeType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointComputeType.java new file mode 100644 index 000000000000..5d44ce1b456a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointComputeType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EndpointComputeType. */ +public final class EndpointComputeType extends ExpandableStringEnum { + /** Static value Managed for EndpointComputeType. */ + public static final EndpointComputeType MANAGED = fromString("Managed"); + + /** Static value K8S for EndpointComputeType. */ + public static final EndpointComputeType K8S = fromString("K8S"); + + /** Static value AzureMLCompute for EndpointComputeType. */ + public static final EndpointComputeType AZURE_MLCOMPUTE = fromString("AzureMLCompute"); + + /** + * Creates or finds a EndpointComputeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointComputeType. + */ + @JsonCreator + public static EndpointComputeType fromString(String name) { + return fromString(name, EndpointComputeType.class); + } + + /** @return known EndpointComputeType values. */ + public static Collection values() { + return values(EndpointComputeType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointProvisioningState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointProvisioningState.java new file mode 100644 index 000000000000..960d907a527d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EndpointProvisioningState.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EndpointProvisioningState. */ +public final class EndpointProvisioningState extends ExpandableStringEnum { + /** Static value Creating for EndpointProvisioningState. */ + public static final EndpointProvisioningState CREATING = fromString("Creating"); + + /** Static value Deleting for EndpointProvisioningState. */ + public static final EndpointProvisioningState DELETING = fromString("Deleting"); + + /** Static value Succeeded for EndpointProvisioningState. */ + public static final EndpointProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for EndpointProvisioningState. */ + public static final EndpointProvisioningState FAILED = fromString("Failed"); + + /** Static value Updating for EndpointProvisioningState. */ + public static final EndpointProvisioningState UPDATING = fromString("Updating"); + + /** Static value Canceled for EndpointProvisioningState. */ + public static final EndpointProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates or finds a EndpointProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointProvisioningState. + */ + @JsonCreator + public static EndpointProvisioningState fromString(String name) { + return fromString(name, EndpointProvisioningState.class); + } + + /** @return known EndpointProvisioningState values. */ + public static Collection values() { + return values(EndpointProvisioningState.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainer.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainer.java new file mode 100644 index 000000000000..9552ac5c1af2 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainer.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Container for environment specification versions. */ +@Fluent +public final class EnvironmentContainer { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentContainer.class); + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the EnvironmentContainer object itself. + */ + public EnvironmentContainer withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the EnvironmentContainer object itself. + */ + public EnvironmentContainer withProperties(Map properties) { + this.properties = properties; + 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 EnvironmentContainer object itself. + */ + public EnvironmentContainer withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainerResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainerResource.java new file mode 100644 index 000000000000..d1a972488069 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainerResource.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentContainerResourceInner; + +/** An immutable client-side representation of EnvironmentContainerResource. */ +public interface EnvironmentContainerResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + EnvironmentContainer properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentContainerResourceInner + * object. + * + * @return the inner object. + */ + EnvironmentContainerResourceInner innerModel(); + + /** The entirety of the EnvironmentContainerResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The EnvironmentContainerResource definition stages. */ + interface DefinitionStages { + /** The first stage of the EnvironmentContainerResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the EnvironmentContainerResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the EnvironmentContainerResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(EnvironmentContainer properties); + } + /** + * The stage of the EnvironmentContainerResource 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. + */ + EnvironmentContainerResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EnvironmentContainerResource create(Context context); + } + } + /** + * Begins update for the EnvironmentContainerResource resource. + * + * @return the stage of resource update. + */ + EnvironmentContainerResource.Update update(); + + /** The template for EnvironmentContainerResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EnvironmentContainerResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EnvironmentContainerResource apply(Context context); + } + /** The EnvironmentContainerResource update stages. */ + interface UpdateStages { + /** The stage of the EnvironmentContainerResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(EnvironmentContainer properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EnvironmentContainerResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EnvironmentContainerResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainerResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainerResourceArmPaginatedResult.java new file mode 100644 index 000000000000..0fa18fd5fd60 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainerResourceArmPaginatedResult.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentContainerResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of EnvironmentContainer entities. */ +@Fluent +public final class EnvironmentContainerResourceArmPaginatedResult { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(EnvironmentContainerResourceArmPaginatedResult.class); + + /* + * The link to the next page of EnvironmentContainer objects. If null, + * there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type EnvironmentContainer. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of EnvironmentContainer 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 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; + } + + /** + * Get the value property: An array of objects of type EnvironmentContainer. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainers.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainers.java new file mode 100644 index 000000000000..b20b08998a87 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentContainers.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 EnvironmentContainers. */ +public interface EnvironmentContainers { + /** + * 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Context context); + + /** + * Delete container. + * + * @param name Container 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. + */ + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get container. + * + * @param name Container 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 container. + */ + EnvironmentContainerResource get(String name, String resourceGroupName, String workspaceName); + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * 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. + */ + EnvironmentContainerResource getById(String id); + + /** + * Get container. + * + * @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 container. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete 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. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EnvironmentContainerResource resource. + * + * @param name resource name. + * @return the first stage of the new EnvironmentContainerResource definition. + */ + EnvironmentContainerResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequest.java deleted file mode 100644 index be4b32d72d69..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequest.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Request to create a Docker image based on Environment. */ -@Fluent -public class EnvironmentImageRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentImageRequest.class); - - /* - * The name of the driver file. - */ - @JsonProperty(value = "driverProgram") - private String driverProgram; - - /* - * The list of assets. - */ - @JsonProperty(value = "assets") - private List assets; - - /* - * The list of model Ids. - */ - @JsonProperty(value = "modelIds") - private List modelIds; - - /* - * The list of models. - */ - @JsonProperty(value = "models") - private List models; - - /* - * The details of the AZURE ML environment. - */ - @JsonProperty(value = "environment") - private EnvironmentImageRequestEnvironment environment; - - /* - * The unique identifying details of the AZURE ML environment. - */ - @JsonProperty(value = "environmentReference") - private EnvironmentImageRequestEnvironmentReference environmentReference; - - /** - * Get the driverProgram property: The name of the driver file. - * - * @return the driverProgram value. - */ - public String driverProgram() { - return this.driverProgram; - } - - /** - * Set the driverProgram property: The name of the driver file. - * - * @param driverProgram the driverProgram value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withDriverProgram(String driverProgram) { - this.driverProgram = driverProgram; - return this; - } - - /** - * Get the assets property: The list of assets. - * - * @return the assets value. - */ - public List assets() { - return this.assets; - } - - /** - * Set the assets property: The list of assets. - * - * @param assets the assets value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withAssets(List assets) { - this.assets = assets; - return this; - } - - /** - * Get the modelIds property: The list of model Ids. - * - * @return the modelIds value. - */ - public List modelIds() { - return this.modelIds; - } - - /** - * Set the modelIds property: The list of model Ids. - * - * @param modelIds the modelIds value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withModelIds(List modelIds) { - this.modelIds = modelIds; - return this; - } - - /** - * Get the models property: The list of models. - * - * @return the models value. - */ - public List models() { - return this.models; - } - - /** - * Set the models property: The list of models. - * - * @param models the models value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withModels(List models) { - this.models = models; - return this; - } - - /** - * Get the environment property: The details of the AZURE ML environment. - * - * @return the environment value. - */ - public EnvironmentImageRequestEnvironment environment() { - return this.environment; - } - - /** - * Set the environment property: The details of the AZURE ML environment. - * - * @param environment the environment value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withEnvironment(EnvironmentImageRequestEnvironment environment) { - this.environment = environment; - return this; - } - - /** - * Get the environmentReference property: The unique identifying details of the AZURE ML environment. - * - * @return the environmentReference value. - */ - public EnvironmentImageRequestEnvironmentReference environmentReference() { - return this.environmentReference; - } - - /** - * Set the environmentReference property: The unique identifying details of the AZURE ML environment. - * - * @param environmentReference the environmentReference value to set. - * @return the EnvironmentImageRequest object itself. - */ - public EnvironmentImageRequest withEnvironmentReference( - EnvironmentImageRequestEnvironmentReference environmentReference) { - this.environmentReference = environmentReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (assets() != null) { - assets().forEach(e -> e.validate()); - } - if (models() != null) { - models().forEach(e -> e.validate()); - } - if (environment() != null) { - environment().validate(); - } - if (environmentReference() != null) { - environmentReference().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironment.java deleted file mode 100644 index 3dab366636fb..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironment.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Map; - -/** The details of the AZURE ML environment. */ -@Immutable -public final class EnvironmentImageRequestEnvironment extends ModelEnvironmentDefinition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentImageRequestEnvironment.class); - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withVersion(String version) { - super.withVersion(version); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withPython(ModelEnvironmentDefinitionPython python) { - super.withPython(python); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withDocker(ModelEnvironmentDefinitionDocker docker) { - super.withDocker(docker); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withSpark(ModelEnvironmentDefinitionSpark spark) { - super.withSpark(spark); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withR(ModelEnvironmentDefinitionR r) { - super.withR(r); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironment withInferencingStackVersion(String inferencingStackVersion) { - super.withInferencingStackVersion(inferencingStackVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironmentReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironmentReference.java deleted file mode 100644 index e2d879ecfc79..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageRequestEnvironmentReference.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The unique identifying details of the AZURE ML environment. */ -@Immutable -public final class EnvironmentImageRequestEnvironmentReference extends EnvironmentReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentImageRequestEnvironmentReference.class); - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironmentReference withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageRequestEnvironmentReference withVersion(String version) { - super.withVersion(version); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponse.java deleted file mode 100644 index 6296bc7595c2..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponse.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Request to create a Docker image based on Environment. */ -@Fluent -public class EnvironmentImageResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentImageResponse.class); - - /* - * The name of the driver file. - */ - @JsonProperty(value = "driverProgram") - private String driverProgram; - - /* - * The list of assets. - */ - @JsonProperty(value = "assets") - private List assets; - - /* - * The list of model Ids. - */ - @JsonProperty(value = "modelIds") - private List modelIds; - - /* - * The list of models. - */ - @JsonProperty(value = "models") - private List models; - - /* - * The details of the AZURE ML environment. - */ - @JsonProperty(value = "environment") - private EnvironmentImageResponseEnvironment environment; - - /* - * The unique identifying details of the AZURE ML environment. - */ - @JsonProperty(value = "environmentReference") - private EnvironmentImageResponseEnvironmentReference environmentReference; - - /** - * Get the driverProgram property: The name of the driver file. - * - * @return the driverProgram value. - */ - public String driverProgram() { - return this.driverProgram; - } - - /** - * Set the driverProgram property: The name of the driver file. - * - * @param driverProgram the driverProgram value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withDriverProgram(String driverProgram) { - this.driverProgram = driverProgram; - return this; - } - - /** - * Get the assets property: The list of assets. - * - * @return the assets value. - */ - public List assets() { - return this.assets; - } - - /** - * Set the assets property: The list of assets. - * - * @param assets the assets value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withAssets(List assets) { - this.assets = assets; - return this; - } - - /** - * Get the modelIds property: The list of model Ids. - * - * @return the modelIds value. - */ - public List modelIds() { - return this.modelIds; - } - - /** - * Set the modelIds property: The list of model Ids. - * - * @param modelIds the modelIds value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withModelIds(List modelIds) { - this.modelIds = modelIds; - return this; - } - - /** - * Get the models property: The list of models. - * - * @return the models value. - */ - public List models() { - return this.models; - } - - /** - * Set the models property: The list of models. - * - * @param models the models value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withModels(List models) { - this.models = models; - return this; - } - - /** - * Get the environment property: The details of the AZURE ML environment. - * - * @return the environment value. - */ - public EnvironmentImageResponseEnvironment environment() { - return this.environment; - } - - /** - * Set the environment property: The details of the AZURE ML environment. - * - * @param environment the environment value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withEnvironment(EnvironmentImageResponseEnvironment environment) { - this.environment = environment; - return this; - } - - /** - * Get the environmentReference property: The unique identifying details of the AZURE ML environment. - * - * @return the environmentReference value. - */ - public EnvironmentImageResponseEnvironmentReference environmentReference() { - return this.environmentReference; - } - - /** - * Set the environmentReference property: The unique identifying details of the AZURE ML environment. - * - * @param environmentReference the environmentReference value to set. - * @return the EnvironmentImageResponse object itself. - */ - public EnvironmentImageResponse withEnvironmentReference( - EnvironmentImageResponseEnvironmentReference environmentReference) { - this.environmentReference = environmentReference; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (assets() != null) { - assets().forEach(e -> e.validate()); - } - if (models() != null) { - models().forEach(e -> e.validate()); - } - if (environment() != null) { - environment().validate(); - } - if (environmentReference() != null) { - environmentReference().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironment.java deleted file mode 100644 index e5cd71316c82..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironment.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.Map; - -/** The details of the AZURE ML environment. */ -@Immutable -public final class EnvironmentImageResponseEnvironment extends ModelEnvironmentDefinitionResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentImageResponseEnvironment.class); - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withVersion(String version) { - super.withVersion(version); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withPython(ModelEnvironmentDefinitionResponsePython python) { - super.withPython(python); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withDocker(ModelEnvironmentDefinitionResponseDocker docker) { - super.withDocker(docker); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withSpark(ModelEnvironmentDefinitionResponseSpark spark) { - super.withSpark(spark); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withR(ModelEnvironmentDefinitionResponseR r) { - super.withR(r); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironment withInferencingStackVersion(String inferencingStackVersion) { - super.withInferencingStackVersion(inferencingStackVersion); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironmentReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironmentReference.java deleted file mode 100644 index 44e3884772b4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentImageResponseEnvironmentReference.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.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The unique identifying details of the AZURE ML environment. */ -@Immutable -public final class EnvironmentImageResponseEnvironmentReference extends EnvironmentReference { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(EnvironmentImageResponseEnvironmentReference.class); - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironmentReference withName(String name) { - super.withName(name); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentImageResponseEnvironmentReference withVersion(String version) { - super.withVersion(version); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentReference.java deleted file mode 100644 index a9fa90eb103c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentReference.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The EnvironmentReference model. */ -@Fluent -public class EnvironmentReference { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentReference.class); - - /* - * Name of the environment. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Version of the environment. - */ - @JsonProperty(value = "version") - private String version; - - /** - * Get the name property: Name of the environment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the environment. - * - * @param name the name value to set. - * @return the EnvironmentReference object itself. - */ - public EnvironmentReference withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: Version of the environment. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Version of the environment. - * - * @param version the version value to set. - * @return the EnvironmentReference object itself. - */ - public EnvironmentReference withVersion(String version) { - this.version = version; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationType.java new file mode 100644 index 000000000000..877935608466 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EnvironmentSpecificationType. */ +public final class EnvironmentSpecificationType extends ExpandableStringEnum { + /** Static value Curated for EnvironmentSpecificationType. */ + public static final EnvironmentSpecificationType CURATED = fromString("Curated"); + + /** Static value UserCreated for EnvironmentSpecificationType. */ + public static final EnvironmentSpecificationType USER_CREATED = fromString("UserCreated"); + + /** + * Creates or finds a EnvironmentSpecificationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnvironmentSpecificationType. + */ + @JsonCreator + public static EnvironmentSpecificationType fromString(String name) { + return fromString(name, EnvironmentSpecificationType.class); + } + + /** @return known EnvironmentSpecificationType values. */ + public static Collection values() { + return values(EnvironmentSpecificationType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersion.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersion.java new file mode 100644 index 000000000000..471e45f7efa6 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersion.java @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Environment specification version details. <see + * href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. + */ +@Fluent +public final class EnvironmentSpecificationVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentSpecificationVersion.class); + + /* + * Standard configuration file used by Conda that lets you install any kind + * of package, including Python, R, and C/C++ packages. + * + */ + @JsonProperty(value = "condaFile") + private String condaFile; + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Configuration settings for Docker. + */ + @JsonProperty(value = "docker") + private DockerSpecification docker; + + /* + * Environment specification is either user managed or curated by the Azure + * ML service + * + */ + @JsonProperty(value = "environmentSpecificationType", access = JsonProperty.Access.WRITE_ONLY) + private EnvironmentSpecificationType environmentSpecificationType; + + /* + * Defines configuration specific to inference. + */ + @JsonProperty(value = "inferenceContainerProperties") + private InferenceContainerProperties inferenceContainerProperties; + + /* + * If the name version are system generated (anonymous registration). + */ + @JsonProperty(value = "isAnonymous") + private Boolean isAnonymous; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the condaFile property: Standard configuration file used by Conda that lets you install any kind of package, + * including Python, R, and C/C++ packages. <see + * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" + * />. + * + * @return the condaFile value. + */ + public String condaFile() { + return this.condaFile; + } + + /** + * Set the condaFile property: Standard configuration file used by Conda that lets you install any kind of package, + * including Python, R, and C/C++ packages. <see + * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" + * />. + * + * @param condaFile the condaFile value to set. + * @return the EnvironmentSpecificationVersion object itself. + */ + public EnvironmentSpecificationVersion withCondaFile(String condaFile) { + this.condaFile = condaFile; + return this; + } + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the EnvironmentSpecificationVersion object itself. + */ + public EnvironmentSpecificationVersion withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the docker property: Configuration settings for Docker. + * + * @return the docker value. + */ + public DockerSpecification docker() { + return this.docker; + } + + /** + * Set the docker property: Configuration settings for Docker. + * + * @param docker the docker value to set. + * @return the EnvironmentSpecificationVersion object itself. + */ + public EnvironmentSpecificationVersion withDocker(DockerSpecification docker) { + this.docker = docker; + return this; + } + + /** + * Get the environmentSpecificationType property: Environment specification 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 environmentSpecificationType value. + */ + public EnvironmentSpecificationType environmentSpecificationType() { + return this.environmentSpecificationType; + } + + /** + * Get the inferenceContainerProperties property: Defines configuration specific to inference. + * + * @return the inferenceContainerProperties value. + */ + public InferenceContainerProperties inferenceContainerProperties() { + return this.inferenceContainerProperties; + } + + /** + * Set the inferenceContainerProperties property: Defines configuration specific to inference. + * + * @param inferenceContainerProperties the inferenceContainerProperties value to set. + * @return the EnvironmentSpecificationVersion object itself. + */ + public EnvironmentSpecificationVersion withInferenceContainerProperties( + InferenceContainerProperties inferenceContainerProperties) { + this.inferenceContainerProperties = inferenceContainerProperties; + return this; + } + + /** + * Get the isAnonymous property: If the name version are system generated (anonymous registration). + * + * @return the isAnonymous value. + */ + public Boolean isAnonymous() { + return this.isAnonymous; + } + + /** + * Set the isAnonymous property: If the name version are system generated (anonymous registration). + * + * @param isAnonymous the isAnonymous value to set. + * @return the EnvironmentSpecificationVersion object itself. + */ + public EnvironmentSpecificationVersion withIsAnonymous(Boolean isAnonymous) { + this.isAnonymous = isAnonymous; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the EnvironmentSpecificationVersion object itself. + */ + public EnvironmentSpecificationVersion withProperties(Map properties) { + this.properties = properties; + 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 EnvironmentSpecificationVersion object itself. + */ + public EnvironmentSpecificationVersion withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (docker() != null) { + docker().validate(); + } + if (inferenceContainerProperties() != null) { + inferenceContainerProperties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersionResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersionResource.java new file mode 100644 index 000000000000..3c66cebf147a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersionResource.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentSpecificationVersionResourceInner; + +/** An immutable client-side representation of EnvironmentSpecificationVersionResource. */ +public interface EnvironmentSpecificationVersionResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + EnvironmentSpecificationVersion properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner + * com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentSpecificationVersionResourceInner + * object. + * + * @return the inner object. + */ + EnvironmentSpecificationVersionResourceInner innerModel(); + + /** The entirety of the EnvironmentSpecificationVersionResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The EnvironmentSpecificationVersionResource definition stages. */ + interface DefinitionStages { + /** The first stage of the EnvironmentSpecificationVersionResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the EnvironmentSpecificationVersionResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies name, resourceGroupName, workspaceName. + * + * @param name Name of EnvironmentSpecificationVersion. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingEnvironment(String name, String resourceGroupName, String workspaceName); + } + /** The stage of the EnvironmentSpecificationVersionResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(EnvironmentSpecificationVersion properties); + } + /** + * The stage of the EnvironmentSpecificationVersionResource 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. + */ + EnvironmentSpecificationVersionResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EnvironmentSpecificationVersionResource create(Context context); + } + } + /** + * Begins update for the EnvironmentSpecificationVersionResource resource. + * + * @return the stage of resource update. + */ + EnvironmentSpecificationVersionResource.Update update(); + + /** The template for EnvironmentSpecificationVersionResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EnvironmentSpecificationVersionResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EnvironmentSpecificationVersionResource apply(Context context); + } + /** The EnvironmentSpecificationVersionResource update stages. */ + interface UpdateStages { + /** The stage of the EnvironmentSpecificationVersionResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(EnvironmentSpecificationVersion properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EnvironmentSpecificationVersionResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EnvironmentSpecificationVersionResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersionResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersionResourceArmPaginatedResult.java new file mode 100644 index 000000000000..e61f23134e65 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersionResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.EnvironmentSpecificationVersionResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of EnvironmentSpecificationVersion entities. */ +@Fluent +public final class EnvironmentSpecificationVersionResourceArmPaginatedResult { + @JsonIgnore + private final ClientLogger logger = + new ClientLogger(EnvironmentSpecificationVersionResourceArmPaginatedResult.class); + + /* + * The link to the next page of EnvironmentSpecificationVersion objects. If + * null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type EnvironmentSpecificationVersion. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of EnvironmentSpecificationVersion 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 EnvironmentSpecificationVersion objects. If null, there + * are no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the EnvironmentSpecificationVersionResourceArmPaginatedResult object itself. + */ + public EnvironmentSpecificationVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type EnvironmentSpecificationVersion. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type EnvironmentSpecificationVersion. + * + * @param value the value value to set. + * @return the EnvironmentSpecificationVersionResourceArmPaginatedResult object itself. + */ + public EnvironmentSpecificationVersionResourceArmPaginatedResult 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()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersions.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersions.java new file mode 100644 index 000000000000..83e2300d43ef --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EnvironmentSpecificationVersions.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 EnvironmentSpecificationVersions. */ +public interface EnvironmentSpecificationVersions { + /** + * List versions. + * + * @param name Container 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 EnvironmentSpecificationVersion entities. + */ + PagedIterable list( + String name, String resourceGroupName, String workspaceName); + + /** + * List versions. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 a paginated list of EnvironmentSpecificationVersion entities. + */ + PagedIterable list( + String name, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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 delete(String name, String version, String resourceGroupName, String workspaceName); + + /** + * Delete version. + * + * @param name Container name. + * @param version Version identifier. + * @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. + */ + Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + EnvironmentSpecificationVersionResource get( + String name, String version, String resourceGroupName, String workspaceName); + + /** + * Get version. + * + * @param name Container name. + * @param version Version identifier. + * @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 version. + */ + Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); + + /** + * Get version. + * + * @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 version. + */ + EnvironmentSpecificationVersionResource getById(String id); + + /** + * Get version. + * + * @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 version. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete version. + * + * @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 version. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EnvironmentSpecificationVersionResource resource. + * + * @param name resource name. + * @return the first stage of the new EnvironmentSpecificationVersionResource definition. + */ + EnvironmentSpecificationVersionResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrice.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrice.java index 2fa6057aac10..683aaa6df06d 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrice.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrice.java @@ -15,25 +15,25 @@ public final class EstimatedVMPrice { @JsonIgnore private final ClientLogger logger = new ClientLogger(EstimatedVMPrice.class); /* - * The price charged for using the VM. + * Retail price The price charged for using the VM. */ @JsonProperty(value = "retailPrice", required = true) private double retailPrice; /* - * Operating system type used by the VM. + * OS type Operating system type used by the VM. */ @JsonProperty(value = "osType", required = true) private VMPriceOSType osType; /* - * The type of the VM. + * VM tier The type of the VM. */ @JsonProperty(value = "vmTier", required = true) private VMTier vmTier; /** - * Get the retailPrice property: The price charged for using the VM. + * Get the retailPrice property: Retail price The price charged for using the VM. * * @return the retailPrice value. */ @@ -42,7 +42,7 @@ public double retailPrice() { } /** - * Set the retailPrice property: The price charged for using the VM. + * Set the retailPrice property: Retail price The price charged for using the VM. * * @param retailPrice the retailPrice value to set. * @return the EstimatedVMPrice object itself. @@ -53,7 +53,7 @@ public EstimatedVMPrice withRetailPrice(double retailPrice) { } /** - * Get the osType property: Operating system type used by the VM. + * Get the osType property: OS type Operating system type used by the VM. * * @return the osType value. */ @@ -62,7 +62,7 @@ public VMPriceOSType osType() { } /** - * Set the osType property: Operating system type used by the VM. + * Set the osType property: OS type Operating system type used by the VM. * * @param osType the osType value to set. * @return the EstimatedVMPrice object itself. @@ -73,7 +73,7 @@ public EstimatedVMPrice withOsType(VMPriceOSType osType) { } /** - * Get the vmTier property: The type of the VM. + * Get the vmTier property: VM tier The type of the VM. * * @return the vmTier value. */ @@ -82,7 +82,7 @@ public VMTier vmTier() { } /** - * Set the vmTier property: The type of the VM. + * Set the vmTier property: VM tier The type of the VM. * * @param vmTier the vmTier value to set. * @return the EstimatedVMPrice object itself. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrices.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrices.java index f9a9e8e32701..225ce12f7813 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrices.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/EstimatedVMPrices.java @@ -16,28 +16,29 @@ public final class EstimatedVMPrices { @JsonIgnore private final ClientLogger logger = new ClientLogger(EstimatedVMPrices.class); /* - * Three lettered code specifying the currency of the VM price. Example: - * USD + * Billing currency Three lettered code specifying the currency of the VM + * price. Example: USD */ @JsonProperty(value = "billingCurrency", required = true) private BillingCurrency billingCurrency; /* - * The unit of time measurement for the specified VM price. Example: - * OneHour + * Unit of time measure The unit of time measurement for the specified VM + * price. Example: OneHour */ @JsonProperty(value = "unitOfMeasure", required = true) private UnitOfMeasure unitOfMeasure; /* - * The list of estimated prices for using a VM of a particular OS type, - * tier, etc. + * List of estimated VM prices. The list of estimated prices for using a VM + * of a particular OS type, tier, etc. */ @JsonProperty(value = "values", required = true) private List values; /** - * Get the billingCurrency property: Three lettered code specifying the currency of the VM price. Example: USD. + * Get the billingCurrency property: Billing currency Three lettered code specifying the currency of the VM price. + * Example: USD. * * @return the billingCurrency value. */ @@ -46,7 +47,8 @@ public BillingCurrency billingCurrency() { } /** - * Set the billingCurrency property: Three lettered code specifying the currency of the VM price. Example: USD. + * Set the billingCurrency property: Billing currency Three lettered code specifying the currency of the VM price. + * Example: USD. * * @param billingCurrency the billingCurrency value to set. * @return the EstimatedVMPrices object itself. @@ -57,7 +59,8 @@ public EstimatedVMPrices withBillingCurrency(BillingCurrency billingCurrency) { } /** - * Get the unitOfMeasure property: The unit of time measurement for the specified VM price. Example: OneHour. + * Get the unitOfMeasure property: Unit of time measure The unit of time measurement for the specified VM price. + * Example: OneHour. * * @return the unitOfMeasure value. */ @@ -66,7 +69,8 @@ public UnitOfMeasure unitOfMeasure() { } /** - * Set the unitOfMeasure property: The unit of time measurement for the specified VM price. Example: OneHour. + * Set the unitOfMeasure property: Unit of time measure The unit of time measurement for the specified VM price. + * Example: OneHour. * * @param unitOfMeasure the unitOfMeasure value to set. * @return the EstimatedVMPrices object itself. @@ -77,7 +81,8 @@ public EstimatedVMPrices withUnitOfMeasure(UnitOfMeasure unitOfMeasure) { } /** - * Get the values property: The list of estimated prices for using a VM of a particular OS type, tier, etc. + * Get the values property: List of estimated VM prices. The list of estimated prices for using a VM of a particular + * OS type, tier, etc. * * @return the values value. */ @@ -86,7 +91,8 @@ public List values() { } /** - * Set the values property: The list of estimated prices for using a VM of a particular OS type, tier, etc. + * Set the values property: List of estimated VM prices. 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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ExportFormatType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ExportFormatType.java new file mode 100644 index 000000000000..416b404b4d76 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ExportFormatType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ExportFormatType. */ +public final class ExportFormatType extends ExpandableStringEnum { + /** Static value Dataset for ExportFormatType. */ + public static final ExportFormatType DATASET = fromString("Dataset"); + + /** Static value Coco for ExportFormatType. */ + public static final ExportFormatType COCO = fromString("Coco"); + + /** Static value CSV for ExportFormatType. */ + public static final ExportFormatType CSV = fromString("CSV"); + + /** + * Creates or finds a ExportFormatType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExportFormatType. + */ + @JsonCreator + public static ExportFormatType fromString(String name) { + return fromString(name, ExportFormatType.class); + } + + /** @return known ExportFormatType values. */ + public static Collection values() { + return values(ExportFormatType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ExportSummary.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ExportSummary.java new file mode 100644 index 000000000000..d4251d10dac4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ExportSummary.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of ExportSummary. */ +public interface ExportSummary { + /** + * Gets the endTimeUtc property: The time when the export was completed. + * + * @return the endTimeUtc value. + */ + OffsetDateTime endTimeUtc(); + + /** + * Gets the exportedRowCount property: The total number of labeled datapoints exported. + * + * @return the exportedRowCount value. + */ + Long exportedRowCount(); + + /** + * Gets the labelingJobId property: Name and identifier of the job containing exported labels. + * + * @return the labelingJobId value. + */ + String labelingJobId(); + + /** + * Gets the startTimeUtc property: The time when the export was requested. + * + * @return the startTimeUtc value. + */ + OffsetDateTime startTimeUtc(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner object. + * + * @return the inner object. + */ + ExportSummaryInner innerModel(); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/FlavorData.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/FlavorData.java new file mode 100644 index 000000000000..b35871e6627b --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/FlavorData.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The FlavorData model. */ +@Fluent +public final class FlavorData { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FlavorData.class); + + /* + * Model flavor-specific data. + */ + @JsonProperty(value = "data") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map data; + + /** + * Get the data property: Model flavor-specific data. + * + * @return the data value. + */ + public Map data() { + return this.data; + } + + /** + * Set the data property: Model flavor-specific data. + * + * @param data the data value to set. + * @return the FlavorData object itself. + */ + public FlavorData withData(Map data) { + this.data = data; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/GlusterFsContents.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/GlusterFsContents.java new file mode 100644 index 000000000000..2e6c65671f95 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/GlusterFsContents.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** GlusterFs datastore configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "contentsType") +@JsonTypeName("GlusterFs") +@Fluent +public final class GlusterFsContents extends DatastoreContents { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GlusterFsContents.class); + + /* + * GlusterFS server address (can be the IP address or server name). + */ + @JsonProperty(value = "serverAddress", required = true) + private String serverAddress; + + /* + * GlusterFS volume name. + */ + @JsonProperty(value = "volumeName", required = true) + private String volumeName; + + /** + * Get the serverAddress property: GlusterFS server address (can be the IP address or server name). + * + * @return the serverAddress value. + */ + public String serverAddress() { + return this.serverAddress; + } + + /** + * Set the serverAddress property: GlusterFS server address (can be the IP address or server name). + * + * @param serverAddress the serverAddress value to set. + * @return the GlusterFsContents object itself. + */ + public GlusterFsContents withServerAddress(String serverAddress) { + this.serverAddress = serverAddress; + return this; + } + + /** + * Get the volumeName property: GlusterFS volume name. + * + * @return the volumeName value. + */ + public String volumeName() { + return this.volumeName; + } + + /** + * Set the volumeName property: GlusterFS volume name. + * + * @param volumeName the volumeName value to set. + * @return the GlusterFsContents object itself. + */ + public GlusterFsContents withVolumeName(String volumeName) { + this.volumeName = volumeName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (serverAddress() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property serverAddress in model GlusterFsContents")); + } + if (volumeName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property volumeName in model GlusterFsContents")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Goal.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Goal.java new file mode 100644 index 000000000000..1b5f112e644e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Goal.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for Goal. */ +public final class Goal extends ExpandableStringEnum { + /** Static value Minimize for Goal. */ + public static final Goal MINIMIZE = fromString("Minimize"); + + /** Static value Maximize for Goal. */ + public static final Goal MAXIMIZE = fromString("Maximize"); + + /** + * Creates or finds a Goal from its string representation. + * + * @param name a name to look for. + * @return the corresponding Goal. + */ + @JsonCreator + public static Goal fromString(String name) { + return fromString(name, Goal.class); + } + + /** @return known Goal values. */ + public static Collection values() { + return values(Goal.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdAssetReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdAssetReference.java new file mode 100644 index 000000000000..505e6f7f032a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdAssetReference.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Reference to an asset via its ARM resource ID. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") +@JsonTypeName("Id") +@Fluent +public final class IdAssetReference extends AssetReferenceBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IdAssetReference.class); + + /* + * ARM resource ID of the asset. + */ + @JsonProperty(value = "assetId", required = true) + private String assetId; + + /** + * Get the assetId property: ARM resource ID of the asset. + * + * @return the assetId value. + */ + public String assetId() { + return this.assetId; + } + + /** + * Set the assetId property: ARM resource ID of the asset. + * + * @param assetId the assetId value to set. + * @return the IdAssetReference object itself. + */ + public IdAssetReference withAssetId(String assetId) { + this.assetId = 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 + .logExceptionAsError( + new IllegalArgumentException("Missing required property assetId in model IdAssetReference")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Identity.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Identity.java index 0031081c7366..559163c0cf4f 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Identity.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Identity.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -37,6 +38,7 @@ public class Identity { * The user assigned identities associated with the resource. */ @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; /** diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityConfiguration.java new file mode 100644 index 000000000000..6e8330c5ad58 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityConfiguration.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Base definition for identity configuration. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "identityType", + defaultImpl = IdentityConfiguration.class) +@JsonTypeName("IdentityConfiguration") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AMLToken", value = AmlToken.class), + @JsonSubTypes.Type(name = "Managed", value = ManagedIdentity.class) +}) +@Immutable +public class IdentityConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentityConfiguration.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityConfigurationType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityConfigurationType.java new file mode 100644 index 000000000000..427507a7bfa8 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/IdentityConfigurationType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for IdentityConfigurationType. */ +public final class IdentityConfigurationType extends ExpandableStringEnum { + /** Static value Managed for IdentityConfigurationType. */ + public static final IdentityConfigurationType MANAGED = fromString("Managed"); + + /** Static value AMLToken for IdentityConfigurationType. */ + public static final IdentityConfigurationType AMLTOKEN = fromString("AMLToken"); + + /** + * Creates or finds a IdentityConfigurationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IdentityConfigurationType. + */ + @JsonCreator + public static IdentityConfigurationType fromString(String name) { + return fromString(name, IdentityConfigurationType.class); + } + + /** @return known IdentityConfigurationType values. */ + public static Collection values() { + return values(IdentityConfigurationType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAnnotationType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAnnotationType.java new file mode 100644 index 000000000000..aa809fd8ce15 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAnnotationType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ImageAnnotationType. */ +public final class ImageAnnotationType extends ExpandableStringEnum { + /** Static value Classification for ImageAnnotationType. */ + public static final ImageAnnotationType CLASSIFICATION = fromString("Classification"); + + /** Static value BoundingBox for ImageAnnotationType. */ + public static final ImageAnnotationType BOUNDING_BOX = fromString("BoundingBox"); + + /** Static value InstanceSegmentation for ImageAnnotationType. */ + public static final ImageAnnotationType INSTANCE_SEGMENTATION = fromString("InstanceSegmentation"); + + /** + * Creates or finds a ImageAnnotationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImageAnnotationType. + */ + @JsonCreator + public static ImageAnnotationType fromString(String name) { + return fromString(name, ImageAnnotationType.class); + } + + /** @return known ImageAnnotationType values. */ + public static Collection values() { + return values(ImageAnnotationType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAsset.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAsset.java deleted file mode 100644 index 66bfe78287b3..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ImageAsset.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** An Image asset. */ -@Fluent -public final class ImageAsset { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImageAsset.class); - - /* - * The Asset Id. - */ - @JsonProperty(value = "id") - private String id; - - /* - * The mime type. - */ - @JsonProperty(value = "mimeType") - private String mimeType; - - /* - * The Url of the Asset. - */ - @JsonProperty(value = "url") - private String url; - - /* - * Whether the Asset is unpacked. - */ - @JsonProperty(value = "unpack") - private Boolean unpack; - - /** - * Get the id property: The Asset Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The Asset Id. - * - * @param id the id value to set. - * @return the ImageAsset object itself. - */ - public ImageAsset withId(String id) { - this.id = id; - return this; - } - - /** - * Get the mimeType property: The mime type. - * - * @return the mimeType value. - */ - public String mimeType() { - return this.mimeType; - } - - /** - * Set the mimeType property: The mime type. - * - * @param mimeType the mimeType value to set. - * @return the ImageAsset object itself. - */ - public ImageAsset withMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - /** - * Get the url property: The Url of the Asset. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: The Url of the Asset. - * - * @param url the url value to set. - * @return the ImageAsset object itself. - */ - public ImageAsset withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the unpack property: Whether the Asset is unpacked. - * - * @return the unpack value. - */ - public Boolean unpack() { - return this.unpack; - } - - /** - * Set the unpack property: Whether the Asset is unpacked. - * - * @param unpack the unpack value to set. - * @return the ImageAsset object itself. - */ - public ImageAsset withUnpack(Boolean unpack) { - this.unpack = unpack; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/InferenceContainerProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/InferenceContainerProperties.java new file mode 100644 index 000000000000..f82f8d16966a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/InferenceContainerProperties.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The InferenceContainerProperties model. */ +@Fluent +public final class InferenceContainerProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(InferenceContainerProperties.class); + + /* + * The route to check the liveness of the inference server container. + */ + @JsonProperty(value = "livenessRoute") + private Route livenessRoute; + + /* + * The route to check the readiness of the inference server container. + */ + @JsonProperty(value = "readinessRoute") + private Route readinessRoute; + + /* + * The port to send the scoring requests to, within the inference server + * container. + */ + @JsonProperty(value = "scoringRoute") + private Route scoringRoute; + + /** + * Get the livenessRoute property: The route to check the liveness of the inference server container. + * + * @return the livenessRoute value. + */ + public Route livenessRoute() { + return this.livenessRoute; + } + + /** + * Set the livenessRoute property: The route to check the liveness of the inference server container. + * + * @param livenessRoute the livenessRoute value to set. + * @return the InferenceContainerProperties object itself. + */ + public InferenceContainerProperties withLivenessRoute(Route livenessRoute) { + this.livenessRoute = livenessRoute; + return this; + } + + /** + * Get the readinessRoute property: The route to check the readiness of the inference server container. + * + * @return the readinessRoute value. + */ + public Route readinessRoute() { + return this.readinessRoute; + } + + /** + * Set the readinessRoute property: The route to check the readiness of the inference server container. + * + * @param readinessRoute the readinessRoute value to set. + * @return the InferenceContainerProperties object itself. + */ + public InferenceContainerProperties withReadinessRoute(Route readinessRoute) { + this.readinessRoute = readinessRoute; + return this; + } + + /** + * Get the scoringRoute property: The port to send the scoring requests to, within the inference server container. + * + * @return the scoringRoute value. + */ + public Route scoringRoute() { + return this.scoringRoute; + } + + /** + * Set the scoringRoute property: The port to send the scoring requests to, within the inference server container. + * + * @param scoringRoute the scoringRoute value to set. + * @return the InferenceContainerProperties object itself. + */ + public InferenceContainerProperties withScoringRoute(Route scoringRoute) { + this.scoringRoute = scoringRoute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (livenessRoute() != null) { + livenessRoute().validate(); + } + if (readinessRoute() != null) { + readinessRoute().validate(); + } + if (scoringRoute() != null) { + scoringRoute().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/InputDataBinding.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/InputDataBinding.java new file mode 100644 index 000000000000..59be7eecfc7c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/InputDataBinding.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The InputDataBinding model. */ +@Fluent +public final class InputDataBinding { + @JsonIgnore private final ClientLogger logger = new ClientLogger(InputDataBinding.class); + + /* + * ARM resource ID of the registered dataVersion. + */ + @JsonProperty(value = "dataId") + private String dataId; + + /* + * Mechanism for accessing the data artifact. + */ + @JsonProperty(value = "mode") + private DataBindingMode mode; + + /* + * Location of data inside the container process. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + + /** + * Get the dataId property: ARM resource ID of the registered dataVersion. + * + * @return the dataId value. + */ + public String dataId() { + return this.dataId; + } + + /** + * Set the dataId property: ARM resource ID of the registered dataVersion. + * + * @param dataId the dataId value to set. + * @return the InputDataBinding object itself. + */ + public InputDataBinding withDataId(String dataId) { + this.dataId = dataId; + return this; + } + + /** + * Get the mode property: Mechanism for accessing the data artifact. + * + * @return the mode value. + */ + public DataBindingMode mode() { + return this.mode; + } + + /** + * Set the mode property: Mechanism for accessing the data artifact. + * + * @param mode the mode value to set. + * @return the InputDataBinding object itself. + */ + public InputDataBinding withMode(DataBindingMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the pathOnCompute property: Location of data inside the container process. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Location of data inside the container process. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the InputDataBinding object itself. + */ + public InputDataBinding withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBase.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBase.java new file mode 100644 index 000000000000..e821da709baa --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBase.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; + +/** Base definition for a job. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "jobType", + defaultImpl = JobBase.class) +@JsonTypeName("JobBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Command", value = CommandJob.class), + @JsonSubTypes.Type(name = "Sweep", value = SweepJob.class) +}) +@Fluent +public class JobBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JobBase.class); + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of + * FileStreamObject. + */ + @JsonProperty(value = "interactionEndpoints", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map interactionEndpoints; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Specifies the job provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private JobProvisioningState provisioningState; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the JobBase object itself. + */ + public JobBase withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the interactionEndpoints property: List of JobEndpoints. For local jobs, a job endpoint will have an endpoint + * value of FileStreamObject. + * + * @return the interactionEndpoints value. + */ + public Map interactionEndpoints() { + return this.interactionEndpoints; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the JobBase object itself. + */ + public JobBase withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the provisioningState property: Specifies the job provisioning state. + * + * @return the provisioningState value. + */ + public JobProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * 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 JobBase object itself. + */ + public JobBase withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (interactionEndpoints() != null) { + interactionEndpoints() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBaseResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBaseResource.java new file mode 100644 index 000000000000..1d08b6b27319 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBaseResource.java @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.JobBaseResourceInner; + +/** An immutable client-side representation of JobBaseResource. */ +public interface JobBaseResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + JobBase properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.JobBaseResourceInner object. + * + * @return the inner object. + */ + JobBaseResourceInner innerModel(); + + /** The entirety of the JobBaseResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The JobBaseResource definition stages. */ + interface DefinitionStages { + /** The first stage of the JobBaseResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the JobBaseResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the JobBaseResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(JobBase properties); + } + /** + * The stage of the JobBaseResource 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. + */ + JobBaseResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + JobBaseResource create(Context context); + } + } + /** + * Begins update for the JobBaseResource resource. + * + * @return the stage of resource update. + */ + JobBaseResource.Update update(); + + /** The template for JobBaseResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + JobBaseResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + JobBaseResource apply(Context context); + } + /** The JobBaseResource update stages. */ + interface UpdateStages { + /** The stage of the JobBaseResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(JobBase properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + JobBaseResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + JobBaseResource refresh(Context context); + + /** + * Cancels a Job. + * + * @throws com.azure.core.management.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 cancel(); + + /** + * Cancels a Job. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response cancelWithResponse(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBaseResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBaseResourceArmPaginatedResult.java new file mode 100644 index 000000000000..335a784e2953 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobBaseResourceArmPaginatedResult.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.JobBaseResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of JobBase entities. */ +@Fluent +public final class JobBaseResourceArmPaginatedResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JobBaseResourceArmPaginatedResult.class); + + /* + * The link to the next page of JobBase objects. If null, there are no + * additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type JobBase. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of JobBase 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 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; + } + + /** + * Get the value property: An array of objects of type JobBase. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobEndpoint.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobEndpoint.java new file mode 100644 index 000000000000..89e123821c81 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobEndpoint.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Job endpoint definition. */ +@Fluent +public final class JobEndpoint { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JobEndpoint.class); + + /* + * Url for endpoint. + */ + @JsonProperty(value = "endpoint") + private String endpoint; + + /* + * Endpoint type. + */ + @JsonProperty(value = "jobEndpointType") + private String jobEndpointType; + + /* + * Port for endpoint. + */ + @JsonProperty(value = "port") + private Integer port; + + /* + * Additional properties to set on the endpoint. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /** + * Get the endpoint property: Url for endpoint. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: Url for endpoint. + * + * @param endpoint the endpoint value to set. + * @return the JobEndpoint object itself. + */ + public JobEndpoint withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the jobEndpointType property: Endpoint type. + * + * @return the jobEndpointType value. + */ + public String jobEndpointType() { + return this.jobEndpointType; + } + + /** + * Set the jobEndpointType property: Endpoint type. + * + * @param jobEndpointType the jobEndpointType value to set. + * @return the JobEndpoint object itself. + */ + public JobEndpoint withJobEndpointType(String jobEndpointType) { + this.jobEndpointType = jobEndpointType; + return this; + } + + /** + * Get the port property: Port for endpoint. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: Port for endpoint. + * + * @param port the port value to set. + * @return the JobEndpoint object itself. + */ + public JobEndpoint withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the properties property: Additional properties to set on the endpoint. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Additional properties to set on the endpoint. + * + * @param properties the properties value to set. + * @return the JobEndpoint object itself. + */ + public JobEndpoint withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobOutput.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobOutput.java new file mode 100644 index 000000000000..b3b90205ae2c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobOutput.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Job output definition container information on where to find job output/logs. */ +@Immutable +public final class JobOutput { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JobOutput.class); + + /* + * ARM ID of the datastore where the job logs and artifacts are stored, or + * null for the default container ("azureml") in the workspace's storage + * account. + */ + @JsonProperty(value = "datastoreId", access = JsonProperty.Access.WRITE_ONLY) + private String datastoreId; + + /* + * Path within the datastore to the job logs and artifacts. + */ + @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) + private String path; + + /** + * Get the datastoreId property: ARM ID of the datastore where the job logs and artifacts are stored, or null for + * the default container ("azureml") in the workspace's storage account. + * + * @return the datastoreId value. + */ + public String datastoreId() { + return this.datastoreId; + } + + /** + * Get the path property: Path within the datastore to the job logs and artifacts. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobProvisioningState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobProvisioningState.java new file mode 100644 index 000000000000..e4ef22857c14 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobProvisioningState.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for JobProvisioningState. */ +public final class JobProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for JobProvisioningState. */ + public static final JobProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for JobProvisioningState. */ + public static final JobProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for JobProvisioningState. */ + public static final JobProvisioningState CANCELED = fromString("Canceled"); + + /** Static value InProgress for JobProvisioningState. */ + public static final JobProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Creates or finds a JobProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobProvisioningState. + */ + @JsonCreator + public static JobProvisioningState fromString(String name) { + return fromString(name, JobProvisioningState.class); + } + + /** @return known JobProvisioningState values. */ + public static Collection values() { + return values(JobProvisioningState.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobStatus.java new file mode 100644 index 000000000000..c624b24dce6c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobStatus.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for JobStatus. */ +public final class JobStatus extends ExpandableStringEnum { + /** Static value NotStarted for JobStatus. */ + public static final JobStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value Starting for JobStatus. */ + public static final JobStatus STARTING = fromString("Starting"); + + /** Static value Provisioning for JobStatus. */ + public static final JobStatus PROVISIONING = fromString("Provisioning"); + + /** Static value Preparing for JobStatus. */ + public static final JobStatus PREPARING = fromString("Preparing"); + + /** Static value Queued for JobStatus. */ + public static final JobStatus QUEUED = fromString("Queued"); + + /** Static value Running for JobStatus. */ + public static final JobStatus RUNNING = fromString("Running"); + + /** Static value Finalizing for JobStatus. */ + public static final JobStatus FINALIZING = fromString("Finalizing"); + + /** Static value CancelRequested for JobStatus. */ + public static final JobStatus CANCEL_REQUESTED = fromString("CancelRequested"); + + /** Static value Completed for JobStatus. */ + public static final JobStatus COMPLETED = fromString("Completed"); + + /** Static value Failed for JobStatus. */ + public static final JobStatus FAILED = fromString("Failed"); + + /** Static value Canceled for JobStatus. */ + public static final JobStatus CANCELED = fromString("Canceled"); + + /** Static value NotResponding for JobStatus. */ + public static final JobStatus NOT_RESPONDING = fromString("NotResponding"); + + /** Static value Paused for JobStatus. */ + public static final JobStatus PAUSED = fromString("Paused"); + + /** Static value Unknown for JobStatus. */ + public static final JobStatus UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a JobStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobStatus. + */ + @JsonCreator + public static JobStatus fromString(String name) { + return fromString(name, JobStatus.class); + } + + /** @return known JobStatus values. */ + public static Collection values() { + return values(JobStatus.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobType.java new file mode 100644 index 000000000000..1782cccc7e91 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for JobType. */ +public final class JobType extends ExpandableStringEnum { + /** Static value Command for JobType. */ + public static final JobType COMMAND = fromString("Command"); + + /** Static value Sweep for JobType. */ + public static final JobType SWEEP = fromString("Sweep"); + + /** Static value Labeling for JobType. */ + public static final JobType LABELING = fromString("Labeling"); + + /** + * Creates or finds a JobType from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobType. + */ + @JsonCreator + public static JobType fromString(String name) { + return fromString(name, JobType.class); + } + + /** @return known JobType values. */ + public static Collection values() { + return values(JobType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Jobs.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Jobs.java new file mode 100644 index 000000000000..8861dd0482e4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Jobs.java @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 Jobs. */ +public interface Jobs { + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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 skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tags Tags for job to be returned. + * @param tag Jobs returned will have this tag key. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String skip, + String jobType, + String tags, + String tag, + Context context); + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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 delete(String id, String resourceGroupName, String workspaceName); + + /** + * Deletes a Job (asynchronous). + * + * @param id The name and identifier for the Job. + * @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. + */ + void delete(String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a Job by name/id. + * + * @param id The name and identifier for the Job. + * @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 Job by name/id. + */ + JobBaseResource get(String id, String resourceGroupName, String workspaceName); + + /** + * Gets a Job by name/id. + * + * @param id The name and identifier for the Job. + * @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 a Job by name/id. + */ + Response getWithResponse( + String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Cancels a Job. + * + * @param id The name and identifier for the Job. + * @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 cancel(String id, String resourceGroupName, String workspaceName); + + /** + * Cancels a Job. + * + * @param id The name and identifier for the Job. + * @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. + */ + Response cancelWithResponse(String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a Job by name/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 Job by name/id. + */ + JobBaseResource getById(String id); + + /** + * Gets a Job by name/id. + * + * @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 a Job by name/id. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes a Job (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); + + /** + * Deletes a Job (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 JobBaseResource resource. + * + * @param name resource name. + * @return the first stage of the new JobBaseResource definition. + */ + JobBaseResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobsDeleteHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobsDeleteHeaders.java new file mode 100644 index 000000000000..3c1e6018dcfe --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobsDeleteHeaders.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** The JobsDeleteHeaders model. */ +@Fluent +public final class JobsDeleteHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JobsDeleteHeaders.class); + + /* + * The x-ms-async-operation-timeout property. + */ + @JsonProperty(value = "x-ms-async-operation-timeout") + private Duration xMsAsyncOperationTimeout; + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @return the xMsAsyncOperationTimeout value. + */ + public Duration xMsAsyncOperationTimeout() { + return this.xMsAsyncOperationTimeout; + } + + /** + * Set the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @param xMsAsyncOperationTimeout the xMsAsyncOperationTimeout value to set. + * @return the JobsDeleteHeaders object itself. + */ + public JobsDeleteHeaders withXMsAsyncOperationTimeout(Duration xMsAsyncOperationTimeout) { + this.xMsAsyncOperationTimeout = xMsAsyncOperationTimeout; + return this; + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the JobsDeleteHeaders object itself. + */ + public JobsDeleteHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the JobsDeleteHeaders object itself. + */ + public JobsDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobsDeleteResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobsDeleteResponse.java new file mode 100644 index 000000000000..1207708ac5b3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/JobsDeleteResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class JobsDeleteResponse extends ResponseBase { + /** + * Creates an instance of JobsDeleteResponse. + * + * @param request the request which resulted in this JobsDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public JobsDeleteResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, JobsDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/K8SOnlineDeployment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/K8SOnlineDeployment.java new file mode 100644 index 000000000000..c63426a35550 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/K8SOnlineDeployment.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; + +/** The K8SOnlineDeployment model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") +@JsonTypeName("K8S") +@Fluent +public final class K8SOnlineDeployment extends OnlineDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(K8SOnlineDeployment.class); + + /* + * Resource requirements for each container instance within an online + * deployment. + */ + @JsonProperty(value = "containerResourceRequirements") + private ContainerResourceRequirements containerResourceRequirements; + + /** + * Get the containerResourceRequirements property: Resource requirements for each container instance within an + * online deployment. + * + * @return the containerResourceRequirements value. + */ + public ContainerResourceRequirements containerResourceRequirements() { + return this.containerResourceRequirements; + } + + /** + * Set the containerResourceRequirements property: Resource requirements for each container instance within an + * online deployment. + * + * @param containerResourceRequirements the containerResourceRequirements value to set. + * @return the K8SOnlineDeployment object itself. + */ + public K8SOnlineDeployment withContainerResourceRequirements( + ContainerResourceRequirements containerResourceRequirements) { + this.containerResourceRequirements = containerResourceRequirements; + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + super.withAppInsightsEnabled(appInsightsEnabled); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withEnvironmentId(String environmentId) { + super.withEnvironmentId(environmentId); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withEnvironmentVariables(Map environmentVariables) { + super.withEnvironmentVariables(environmentVariables); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { + super.withLivenessProbe(livenessProbe); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withModel(AssetReferenceBase model) { + super.withModel(model); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + super.withRequestSettings(requestSettings); + return this; + } + + /** {@inheritDoc} */ + @Override + public K8SOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + super.withScaleSettings(scaleSettings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (containerResourceRequirements() != null) { + containerResourceRequirements().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/KeyType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/KeyType.java new file mode 100644 index 000000000000..212215dc93ca --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/KeyType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for KeyType. */ +public final class KeyType extends ExpandableStringEnum { + /** Static value Primary for KeyType. */ + public static final KeyType PRIMARY = fromString("Primary"); + + /** Static value Secondary for KeyType. */ + public static final KeyType SECONDARY = fromString("Secondary"); + + /** + * Creates or finds a KeyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding KeyType. + */ + @JsonCreator + public static KeyType fromString(String name) { + return fromString(name, KeyType.class); + } + + /** @return known KeyType values. */ + public static Collection values() { + return values(KeyType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelCategory.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelCategory.java new file mode 100644 index 000000000000..16f24f23dc69 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelCategory.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Label category definition. */ +@Fluent +public final class LabelCategory { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelCategory.class); + + /* + * Indicates whether it is allowed to select multiple classes in this + * category. + */ + @JsonProperty(value = "allowMultiSelect") + private Boolean allowMultiSelect; + + /* + * Dictionary of label classes in this category. + */ + @JsonProperty(value = "classes") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map classes; + + /* + * Display name of the label category. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Get the allowMultiSelect property: Indicates whether it is allowed to select multiple classes in this category. + * + * @return the allowMultiSelect value. + */ + public Boolean allowMultiSelect() { + return this.allowMultiSelect; + } + + /** + * Set the allowMultiSelect property: Indicates whether it is allowed to select multiple classes in this category. + * + * @param allowMultiSelect the allowMultiSelect value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withAllowMultiSelect(Boolean allowMultiSelect) { + this.allowMultiSelect = allowMultiSelect; + return this; + } + + /** + * Get the classes property: Dictionary of label classes in this category. + * + * @return the classes value. + */ + public Map classes() { + return this.classes; + } + + /** + * Set the classes property: Dictionary of label classes in this category. + * + * @param classes the classes value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withClasses(Map classes) { + this.classes = classes; + return this; + } + + /** + * Get the displayName property: Display name of the label category. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the label category. + * + * @param displayName the displayName value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (classes() != null) { + classes() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelClass.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelClass.java new file mode 100644 index 000000000000..ec681f11c50f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelClass.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Label class definition. */ +@Fluent +public final class LabelClass { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelClass.class); + + /* + * Display name of the label class. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Dictionary of subclasses of the label class. + */ + @JsonProperty(value = "subclasses") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map subclasses; + + /** + * Get the displayName property: Display name of the label class. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the label class. + * + * @param displayName the displayName value to set. + * @return the LabelClass object itself. + */ + public LabelClass withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the subclasses property: Dictionary of subclasses of the label class. + * + * @return the subclasses value. + */ + public Map subclasses() { + return this.subclasses; + } + + /** + * Set the subclasses property: Dictionary of subclasses of the label class. + * + * @param subclasses the subclasses value to set. + * @return the LabelClass object itself. + */ + public LabelClass withSubclasses(Map subclasses) { + this.subclasses = subclasses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subclasses() != null) { + subclasses() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingDatasetConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingDatasetConfiguration.java new file mode 100644 index 000000000000..72efea6c9317 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingDatasetConfiguration.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Labeling dataset configuration definition. */ +@Fluent +public final class LabelingDatasetConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingDatasetConfiguration.class); + + /* + * Name of the data asset to perform labeling. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * AML dataset version. + */ + @JsonProperty(value = "datasetVersion") + private String datasetVersion; + + /* + * Indicates whether to enable incremental dataset refresh. + */ + @JsonProperty(value = "incrementalDatasetRefreshEnabled") + private Boolean incrementalDatasetRefreshEnabled; + + /** + * Get the assetName property: Name of the data asset to perform labeling. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Name of the data asset to perform labeling. + * + * @param assetName the assetName value to set. + * @return the LabelingDatasetConfiguration object itself. + */ + public LabelingDatasetConfiguration withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the datasetVersion property: AML dataset version. + * + * @return the datasetVersion value. + */ + public String datasetVersion() { + return this.datasetVersion; + } + + /** + * Set the datasetVersion property: AML dataset version. + * + * @param datasetVersion the datasetVersion value to set. + * @return the LabelingDatasetConfiguration object itself. + */ + public LabelingDatasetConfiguration withDatasetVersion(String datasetVersion) { + this.datasetVersion = datasetVersion; + return this; + } + + /** + * Get the incrementalDatasetRefreshEnabled property: Indicates whether to enable incremental dataset refresh. + * + * @return the incrementalDatasetRefreshEnabled value. + */ + public Boolean incrementalDatasetRefreshEnabled() { + return this.incrementalDatasetRefreshEnabled; + } + + /** + * Set the incrementalDatasetRefreshEnabled property: Indicates whether to enable incremental dataset refresh. + * + * @param incrementalDatasetRefreshEnabled the incrementalDatasetRefreshEnabled value to set. + * @return the LabelingDatasetConfiguration object itself. + */ + public LabelingDatasetConfiguration withIncrementalDatasetRefreshEnabled(Boolean incrementalDatasetRefreshEnabled) { + this.incrementalDatasetRefreshEnabled = incrementalDatasetRefreshEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJob.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJob.java new file mode 100644 index 000000000000..5e5eec79eb3b --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJob.java @@ -0,0 +1,419 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** Labeling job definition. */ +@Fluent +public final class LabelingJob { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJob.class); + + /* + * Created time of the job in UTC timezone. + */ + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; + + /* + * Configuration of dataset used in the job. + */ + @JsonProperty(value = "datasetConfiguration") + private LabelingDatasetConfiguration datasetConfiguration; + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of + * FileStreamObject. + */ + @JsonProperty(value = "interactionEndpoints", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map interactionEndpoints; + + /* + * Labeling instructions of the job. + */ + @JsonProperty(value = "jobInstructions") + private LabelingJobInstructions jobInstructions; + + /* + * Specifies the type of job. This field should always be set to + * "Labeling". + */ + @JsonProperty(value = "jobType", required = true) + private JobType jobType; + + /* + * Label categories of the job. + */ + @JsonProperty(value = "labelCategories") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map labelCategories; + + /* + * Media type specific properties in the job. + */ + @JsonProperty(value = "labelingJobMediaProperties") + private LabelingJobMediaProperties labelingJobMediaProperties; + + /* + * Configuration of MLAssist feature in the job. + */ + @JsonProperty(value = "mlAssistConfiguration") + private MLAssistConfiguration mlAssistConfiguration; + + /* + * Progress metrics of the job. + */ + @JsonProperty(value = "progressMetrics", access = JsonProperty.Access.WRITE_ONLY) + private ProgressMetrics progressMetrics; + + /* + * Internal id of the job(Previously called project). + */ + @JsonProperty(value = "projectId", access = JsonProperty.Access.WRITE_ONLY) + private UUID projectId; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Specifies the labeling job provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private JobProvisioningState provisioningState; + + /* + * Status of the job. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private JobStatus status; + + /* + * Status messages of the job. + */ + @JsonProperty(value = "statusMessages", access = JsonProperty.Access.WRITE_ONLY) + private List statusMessages; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the createdTimeUtc property: Created time of the job in UTC timezone. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; + } + + /** + * Get the datasetConfiguration property: Configuration of dataset used in the job. + * + * @return the datasetConfiguration value. + */ + public LabelingDatasetConfiguration datasetConfiguration() { + return this.datasetConfiguration; + } + + /** + * Set the datasetConfiguration property: Configuration of dataset used in the job. + * + * @param datasetConfiguration the datasetConfiguration value to set. + * @return the LabelingJob object itself. + */ + public LabelingJob withDatasetConfiguration(LabelingDatasetConfiguration datasetConfiguration) { + this.datasetConfiguration = datasetConfiguration; + return this; + } + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the LabelingJob object itself. + */ + public LabelingJob withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the interactionEndpoints property: List of JobEndpoints. For local jobs, a job endpoint will have an endpoint + * value of FileStreamObject. + * + * @return the interactionEndpoints value. + */ + public Map interactionEndpoints() { + return this.interactionEndpoints; + } + + /** + * Get the jobInstructions property: Labeling instructions of the job. + * + * @return the jobInstructions value. + */ + public LabelingJobInstructions jobInstructions() { + return this.jobInstructions; + } + + /** + * Set the jobInstructions property: Labeling instructions of the job. + * + * @param jobInstructions the jobInstructions value to set. + * @return the LabelingJob object itself. + */ + public LabelingJob withJobInstructions(LabelingJobInstructions jobInstructions) { + this.jobInstructions = jobInstructions; + return this; + } + + /** + * Get the jobType property: Specifies the type of job. This field should always be set to "Labeling". + * + * @return the jobType value. + */ + public JobType jobType() { + return this.jobType; + } + + /** + * Set the jobType property: Specifies the type of job. This field should always be set to "Labeling". + * + * @param jobType the jobType value to set. + * @return the LabelingJob object itself. + */ + public LabelingJob withJobType(JobType jobType) { + this.jobType = jobType; + return this; + } + + /** + * Get the labelCategories property: Label categories of the job. + * + * @return the labelCategories value. + */ + public Map labelCategories() { + return this.labelCategories; + } + + /** + * Set the labelCategories property: Label categories of the job. + * + * @param labelCategories the labelCategories value to set. + * @return the LabelingJob object itself. + */ + public LabelingJob withLabelCategories(Map labelCategories) { + this.labelCategories = labelCategories; + return this; + } + + /** + * Get the labelingJobMediaProperties property: Media type specific properties in the job. + * + * @return the labelingJobMediaProperties value. + */ + public LabelingJobMediaProperties labelingJobMediaProperties() { + return this.labelingJobMediaProperties; + } + + /** + * Set the labelingJobMediaProperties property: Media type specific properties in the job. + * + * @param labelingJobMediaProperties the labelingJobMediaProperties value to set. + * @return the LabelingJob object itself. + */ + public LabelingJob withLabelingJobMediaProperties(LabelingJobMediaProperties labelingJobMediaProperties) { + this.labelingJobMediaProperties = labelingJobMediaProperties; + return this; + } + + /** + * Get the mlAssistConfiguration property: Configuration of MLAssist feature in the job. + * + * @return the mlAssistConfiguration value. + */ + public MLAssistConfiguration mlAssistConfiguration() { + return this.mlAssistConfiguration; + } + + /** + * Set the mlAssistConfiguration property: Configuration of MLAssist feature in the job. + * + * @param mlAssistConfiguration the mlAssistConfiguration value to set. + * @return the LabelingJob object itself. + */ + public LabelingJob withMlAssistConfiguration(MLAssistConfiguration mlAssistConfiguration) { + this.mlAssistConfiguration = mlAssistConfiguration; + return this; + } + + /** + * Get the progressMetrics property: Progress metrics of the job. + * + * @return the progressMetrics value. + */ + public ProgressMetrics progressMetrics() { + return this.progressMetrics; + } + + /** + * Get the projectId property: Internal id of the job(Previously called project). + * + * @return the projectId value. + */ + public UUID projectId() { + return this.projectId; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the LabelingJob object itself. + */ + public LabelingJob withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the provisioningState property: Specifies the labeling job provisioning state. + * + * @return the provisioningState value. + */ + public JobProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: Status of the job. + * + * @return the status value. + */ + public JobStatus status() { + return this.status; + } + + /** + * Get the statusMessages property: Status messages of the job. + * + * @return the statusMessages value. + */ + public List statusMessages() { + return this.statusMessages; + } + + /** + * 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 LabelingJob object itself. + */ + public LabelingJob withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (datasetConfiguration() != null) { + datasetConfiguration().validate(); + } + if (interactionEndpoints() != null) { + interactionEndpoints() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (jobInstructions() != null) { + jobInstructions().validate(); + } + if (jobType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property jobType in model LabelingJob")); + } + if (labelCategories() != null) { + labelCategories() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (labelingJobMediaProperties() != null) { + labelingJobMediaProperties().validate(); + } + if (mlAssistConfiguration() != null) { + mlAssistConfiguration().validate(); + } + if (progressMetrics() != null) { + progressMetrics().validate(); + } + if (statusMessages() != null) { + statusMessages().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobImageProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobImageProperties.java new file mode 100644 index 000000000000..783d22ea9fec --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobImageProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Properties of a labeling job for image data. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mediaType") +@JsonTypeName("Image") +@Fluent +public final class LabelingJobImageProperties extends LabelingJobMediaProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobImageProperties.class); + + /* + * Annotation type of image labeling job. + */ + @JsonProperty(value = "annotationType") + private ImageAnnotationType annotationType; + + /** + * Get the annotationType property: Annotation type of image labeling job. + * + * @return the annotationType value. + */ + public ImageAnnotationType annotationType() { + return this.annotationType; + } + + /** + * Set the annotationType property: Annotation type of image labeling job. + * + * @param annotationType the annotationType value to set. + * @return the LabelingJobImageProperties object itself. + */ + public LabelingJobImageProperties withAnnotationType(ImageAnnotationType annotationType) { + this.annotationType = annotationType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistryResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobInstructions.java similarity index 51% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistryResponse.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobInstructions.java index 61727e355949..0d8c805d814d 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ContainerRegistryResponse.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobInstructions.java @@ -9,34 +9,34 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ContainerRegistryResponse model. */ +/** Instructions for labeling job. */ @Fluent -public class ContainerRegistryResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerRegistryResponse.class); +public final class LabelingJobInstructions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobInstructions.class); /* - * The address property. + * The link to a page with detailed labeling instructions for labelers. */ - @JsonProperty(value = "address") - private String address; + @JsonProperty(value = "uri") + private String uri; /** - * Get the address property: The address property. + * Get the uri property: The link to a page with detailed labeling instructions for labelers. * - * @return the address value. + * @return the uri value. */ - public String address() { - return this.address; + public String uri() { + return this.uri; } /** - * Set the address property: The address property. + * Set the uri property: The link to a page with detailed labeling instructions for labelers. * - * @param address the address value to set. - * @return the ContainerRegistryResponse object itself. + * @param uri the uri value to set. + * @return the LabelingJobInstructions object itself. */ - public ContainerRegistryResponse withAddress(String address) { - this.address = address; + public LabelingJobInstructions withUri(String uri) { + this.uri = uri; return this; } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobMediaProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobMediaProperties.java new file mode 100644 index 000000000000..a5ae8d847556 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobMediaProperties.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Properties of a labeling job. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "mediaType", + defaultImpl = LabelingJobMediaProperties.class) +@JsonTypeName("LabelingJobMediaProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Image", value = LabelingJobImageProperties.class), + @JsonSubTypes.Type(name = "Text", value = LabelingJobTextProperties.class) +}) +@Immutable +public class LabelingJobMediaProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobMediaProperties.class); + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobResource.java new file mode 100644 index 000000000000..e31cce9e1635 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobResource.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.LabelingJobResourceInner; + +/** An immutable client-side representation of LabelingJobResource. */ +public interface LabelingJobResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + LabelingJob properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.LabelingJobResourceInner object. + * + * @return the inner object. + */ + LabelingJobResourceInner innerModel(); + + /** The entirety of the LabelingJobResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The LabelingJobResource definition stages. */ + interface DefinitionStages { + /** The first stage of the LabelingJobResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the LabelingJobResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the LabelingJobResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(LabelingJob properties); + } + /** + * The stage of the LabelingJobResource 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. + */ + LabelingJobResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LabelingJobResource create(Context context); + } + } + /** + * Begins update for the LabelingJobResource resource. + * + * @return the stage of resource update. + */ + LabelingJobResource.Update update(); + + /** The template for LabelingJobResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LabelingJobResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LabelingJobResource apply(Context context); + } + /** The LabelingJobResource update stages. */ + interface UpdateStages { + /** The stage of the LabelingJobResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(LabelingJob properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LabelingJobResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LabelingJobResource refresh(Context context); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportSummary exportLabels(ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportSummary exportLabels(ExportSummaryInner body, Context context); + + /** + * Pause a labeling job. + * + * @throws com.azure.core.management.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 pause(); + + /** + * Pause a labeling job. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response pauseWithResponse(Context context); + + /** + * Resume a labeling job (asynchronous). + * + * @throws com.azure.core.management.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 resume(); + + /** + * Resume a labeling job (asynchronous). + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 resume(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobResourceArmPaginatedResult.java new file mode 100644 index 000000000000..595d191d8e5e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobResourceArmPaginatedResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.LabelingJobResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of LabelingJob entities. */ +@Fluent +public final class LabelingJobResourceArmPaginatedResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobResourceArmPaginatedResult.class); + + /* + * The link to the next page of LabelingJob objects. If null, there are no + * additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type LabelingJob. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of LabelingJob 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 LabelingJob objects. If null, there are no additional + * pages. + * + * @param nextLink the nextLink value to set. + * @return the LabelingJobResourceArmPaginatedResult object itself. + */ + public LabelingJobResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type LabelingJob. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type LabelingJob. + * + * @param value the value value to set. + * @return the LabelingJobResourceArmPaginatedResult object itself. + */ + public LabelingJobResourceArmPaginatedResult 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()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobTextProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobTextProperties.java new file mode 100644 index 000000000000..706e5ebe54cd --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobTextProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Properties of a labeling job for text data. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mediaType") +@JsonTypeName("Text") +@Fluent +public final class LabelingJobTextProperties extends LabelingJobMediaProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobTextProperties.class); + + /* + * Annotation type of text labeling job. + */ + @JsonProperty(value = "annotationType") + private TextAnnotationType annotationType; + + /** + * Get the annotationType property: Annotation type of text labeling job. + * + * @return the annotationType value. + */ + public TextAnnotationType annotationType() { + return this.annotationType; + } + + /** + * Set the annotationType property: Annotation type of text labeling job. + * + * @param annotationType the annotationType value to set. + * @return the LabelingJobTextProperties object itself. + */ + public LabelingJobTextProperties withAnnotationType(TextAnnotationType annotationType) { + this.annotationType = annotationType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobs.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobs.java new file mode 100644 index 000000000000..7e53fe5c3500 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobs.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.ExportSummaryInner; + +/** Resource collection API of LabelingJobs. */ +public interface LabelingJobs { + /** + * Lists labeling 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists labeling 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 skip Continuation token for pagination. + * @param count Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of LabelingJob entities. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context); + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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 delete(String id, String resourceGroupName, String workspaceName); + + /** + * Delete a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + Response deleteWithResponse(String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @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 labeling job by name/id. + */ + LabelingJobResource get(String id, String resourceGroupName, String workspaceName); + + /** + * Gets a labeling job by name/id. + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id. + */ + Response getWithResponse( + String id, + String resourceGroupName, + String workspaceName, + Boolean includeJobInstructions, + Boolean includeLabelCategories, + Context context); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportSummary exportLabels(String id, String resourceGroupName, String workspaceName, ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExportSummary exportLabels( + String id, String resourceGroupName, String workspaceName, ExportSummaryInner body, Context context); + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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 pause(String id, String resourceGroupName, String workspaceName); + + /** + * Pause a labeling job. + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + Response pauseWithResponse(String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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 resume(String id, String resourceGroupName, String workspaceName); + + /** + * Resume a labeling job (asynchronous). + * + * @param id The name and identifier for the LabelingJob. + * @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. + */ + void resume(String id, String resourceGroupName, String workspaceName, Context context); + + /** + * Gets a labeling job by name/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 labeling job by name/id. + */ + LabelingJobResource getById(String id); + + /** + * Gets a labeling job by name/id. + * + * @param id the resource ID. + * @param includeJobInstructions Boolean value to indicate whether to include JobInstructions in response. + * @param includeLabelCategories Boolean value to indicate Whether to include LabelCategories in 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 labeling job by name/id. + */ + Response getByIdWithResponse( + String id, Boolean includeJobInstructions, Boolean includeLabelCategories, Context context); + + /** + * Delete a labeling job. + * + * @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 a labeling job. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new LabelingJobResource resource. + * + * @param name resource name. + * @return the first stage of the new LabelingJobResource definition. + */ + LabelingJobResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsCreateOrUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsCreateOrUpdateHeaders.java new file mode 100644 index 000000000000..6778f89ef98c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsCreateOrUpdateHeaders.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** The LabelingJobsCreateOrUpdateHeaders model. */ +@Fluent +public final class LabelingJobsCreateOrUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobsCreateOrUpdateHeaders.class); + + /* + * The x-ms-async-operation-timeout property. + */ + @JsonProperty(value = "x-ms-async-operation-timeout") + private Duration xMsAsyncOperationTimeout; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @return the xMsAsyncOperationTimeout value. + */ + public Duration xMsAsyncOperationTimeout() { + return this.xMsAsyncOperationTimeout; + } + + /** + * Set the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @param xMsAsyncOperationTimeout the xMsAsyncOperationTimeout value to set. + * @return the LabelingJobsCreateOrUpdateHeaders object itself. + */ + public LabelingJobsCreateOrUpdateHeaders withXMsAsyncOperationTimeout(Duration xMsAsyncOperationTimeout) { + this.xMsAsyncOperationTimeout = xMsAsyncOperationTimeout; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the LabelingJobsCreateOrUpdateHeaders object itself. + */ + public LabelingJobsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsCreateOrUpdateResponse.java similarity index 64% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateResponse.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsCreateOrUpdateResponse.java index bb074ed812a7..648e76327087 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServicesCreateOrUpdateResponse.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsCreateOrUpdateResponse.java @@ -7,32 +7,32 @@ import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.LabelingJobResourceInner; /** Contains all response data for the createOrUpdate operation. */ -public final class MachineLearningServicesCreateOrUpdateResponse - extends ResponseBase { +public final class LabelingJobsCreateOrUpdateResponse + extends ResponseBase { /** - * Creates an instance of MachineLearningServicesCreateOrUpdateResponse. + * Creates an instance of LabelingJobsCreateOrUpdateResponse. * - * @param request the request which resulted in this MachineLearningServicesCreateOrUpdateResponse. + * @param request the request which resulted in this LabelingJobsCreateOrUpdateResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public MachineLearningServicesCreateOrUpdateResponse( + public LabelingJobsCreateOrUpdateResponse( HttpRequest request, int statusCode, HttpHeaders rawHeaders, - ServiceResourceInner value, - MachineLearningServicesCreateOrUpdateHeaders headers) { + LabelingJobResourceInner value, + LabelingJobsCreateOrUpdateHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } /** @return the deserialized response body. */ @Override - public ServiceResourceInner getValue() { + public LabelingJobResourceInner getValue() { return super.getValue(); } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsExportLabelsHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsExportLabelsHeaders.java new file mode 100644 index 000000000000..5e23c6d878ca --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsExportLabelsHeaders.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The LabelingJobsExportLabelsHeaders model. */ +@Fluent +public final class LabelingJobsExportLabelsHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobsExportLabelsHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the LabelingJobsExportLabelsHeaders object itself. + */ + public LabelingJobsExportLabelsHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the LabelingJobsExportLabelsHeaders object itself. + */ + public LabelingJobsExportLabelsHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsExportLabelsResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsExportLabelsResponse.java new file mode 100644 index 000000000000..dfe74d73dc64 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsExportLabelsResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ExportSummaryInner; + +/** Contains all response data for the exportLabels operation. */ +public final class LabelingJobsExportLabelsResponse + extends ResponseBase { + /** + * Creates an instance of LabelingJobsExportLabelsResponse. + * + * @param request the request which resulted in this LabelingJobsExportLabelsResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public LabelingJobsExportLabelsResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + ExportSummaryInner value, + LabelingJobsExportLabelsHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public ExportSummaryInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsResumeHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsResumeHeaders.java new file mode 100644 index 000000000000..6d3dc7530ea2 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsResumeHeaders.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The LabelingJobsResumeHeaders model. */ +@Fluent +public final class LabelingJobsResumeHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LabelingJobsResumeHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the LabelingJobsResumeHeaders object itself. + */ + public LabelingJobsResumeHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the LabelingJobsResumeHeaders object itself. + */ + public LabelingJobsResumeHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsResumeResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsResumeResponse.java new file mode 100644 index 000000000000..87065ffca52d --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LabelingJobsResumeResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the resume operation. */ +public final class LabelingJobsResumeResponse extends ResponseBase { + /** + * Creates an instance of LabelingJobsResumeResponse. + * + * @param request the request which resulted in this LabelingJobsResumeResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public LabelingJobsResumeResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, LabelingJobsResumeHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LinkedInfo.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LinkedInfo.java new file mode 100644 index 000000000000..68b0c029a9f2 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LinkedInfo.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information about a datastore origin, if linked. */ +@Fluent +public final class LinkedInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedInfo.class); + + /* + * Linked service ID. + */ + @JsonProperty(value = "linkedId") + private String linkedId; + + /* + * Linked service resource name. + */ + @JsonProperty(value = "linkedResourceName") + private String linkedResourceName; + + /* + * Type of the linked service. + */ + @JsonProperty(value = "origin") + private OriginType origin; + + /** + * Get the linkedId property: Linked service ID. + * + * @return the linkedId value. + */ + public String linkedId() { + return this.linkedId; + } + + /** + * Set the linkedId property: Linked service ID. + * + * @param linkedId the linkedId value to set. + * @return the LinkedInfo object itself. + */ + public LinkedInfo withLinkedId(String linkedId) { + this.linkedId = linkedId; + return this; + } + + /** + * Get the linkedResourceName property: Linked service resource name. + * + * @return the linkedResourceName value. + */ + public String linkedResourceName() { + return this.linkedResourceName; + } + + /** + * Set the linkedResourceName property: Linked service resource name. + * + * @param linkedResourceName the linkedResourceName value to set. + * @return the LinkedInfo object itself. + */ + public LinkedInfo withLinkedResourceName(String linkedResourceName) { + this.linkedResourceName = linkedResourceName; + return this; + } + + /** + * Get the origin property: Type of the linked service. + * + * @return the origin value. + */ + public OriginType origin() { + return this.origin; + } + + /** + * Set the origin property: Type of the linked service. + * + * @param origin the origin value to set. + * @return the LinkedInfo object itself. + */ + public LinkedInfo withOrigin(OriginType origin) { + this.origin = origin; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LivenessProbeRequirements.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LivenessProbeRequirements.java deleted file mode 100644 index 23ef4ce23e19..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/LivenessProbeRequirements.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The liveness probe requirements. */ -@Fluent -public class LivenessProbeRequirements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LivenessProbeRequirements.class); - - /* - * The number of failures to allow before returning an unhealthy status. - */ - @JsonProperty(value = "failureThreshold") - private Integer failureThreshold; - - /* - * The number of successful probes before returning a healthy status. - */ - @JsonProperty(value = "successThreshold") - private Integer successThreshold; - - /* - * The probe timeout in seconds. - */ - @JsonProperty(value = "timeoutSeconds") - private Integer timeoutSeconds; - - /* - * The length of time between probes in seconds. - */ - @JsonProperty(value = "periodSeconds") - private Integer periodSeconds; - - /* - * The delay before the first probe in seconds. - */ - @JsonProperty(value = "initialDelaySeconds") - private Integer initialDelaySeconds; - - /** - * Get the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * - * @return the failureThreshold value. - */ - public Integer failureThreshold() { - return this.failureThreshold; - } - - /** - * Set the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * - * @param failureThreshold the failureThreshold value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withFailureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; - return this; - } - - /** - * 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 LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withSuccessThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; - return this; - } - - /** - * Get the timeoutSeconds property: The probe timeout in seconds. - * - * @return the timeoutSeconds value. - */ - public Integer timeoutSeconds() { - return this.timeoutSeconds; - } - - /** - * Set the timeoutSeconds property: The probe timeout in seconds. - * - * @param timeoutSeconds the timeoutSeconds value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withTimeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds = timeoutSeconds; - return this; - } - - /** - * Get the periodSeconds property: The length of time between probes in seconds. - * - * @return the periodSeconds value. - */ - public Integer periodSeconds() { - return this.periodSeconds; - } - - /** - * Set the periodSeconds property: The length of time between probes in seconds. - * - * @param periodSeconds the periodSeconds value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withPeriodSeconds(Integer periodSeconds) { - this.periodSeconds = periodSeconds; - return this; - } - - /** - * Get the initialDelaySeconds property: The delay before the first probe in seconds. - * - * @return the initialDelaySeconds value. - */ - public Integer initialDelaySeconds() { - return this.initialDelaySeconds; - } - - /** - * Set the initialDelaySeconds property: The delay before the first probe in seconds. - * - * @param initialDelaySeconds the initialDelaySeconds value to set. - * @return the LivenessProbeRequirements object itself. - */ - public LivenessProbeRequirements withInitialDelaySeconds(Integer initialDelaySeconds) { - this.initialDelaySeconds = initialDelaySeconds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MLAssistConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MLAssistConfiguration.java new file mode 100644 index 000000000000..70f6d032afc7 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MLAssistConfiguration.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Labeling MLAssist configuration definition. */ +@Fluent +public final class MLAssistConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MLAssistConfiguration.class); + + /* + * AML compute binding used in inferencing. + */ + @JsonProperty(value = "inferencingComputeBinding") + private ComputeConfiguration inferencingComputeBinding; + + /* + * Indicates whether MLAssist feature is enabled. + */ + @JsonProperty(value = "mlAssistEnabled") + private Boolean mlAssistEnabled; + + /* + * AML compute binding used in training. + */ + @JsonProperty(value = "trainingComputeBinding") + private ComputeConfiguration trainingComputeBinding; + + /** + * Get the inferencingComputeBinding property: AML compute binding used in inferencing. + * + * @return the inferencingComputeBinding value. + */ + public ComputeConfiguration inferencingComputeBinding() { + return this.inferencingComputeBinding; + } + + /** + * Set the inferencingComputeBinding property: AML compute binding used in inferencing. + * + * @param inferencingComputeBinding the inferencingComputeBinding value to set. + * @return the MLAssistConfiguration object itself. + */ + public MLAssistConfiguration withInferencingComputeBinding(ComputeConfiguration inferencingComputeBinding) { + this.inferencingComputeBinding = inferencingComputeBinding; + return this; + } + + /** + * Get the mlAssistEnabled property: Indicates whether MLAssist feature is enabled. + * + * @return the mlAssistEnabled value. + */ + public Boolean mlAssistEnabled() { + return this.mlAssistEnabled; + } + + /** + * Set the mlAssistEnabled property: Indicates whether MLAssist feature is enabled. + * + * @param mlAssistEnabled the mlAssistEnabled value to set. + * @return the MLAssistConfiguration object itself. + */ + public MLAssistConfiguration withMlAssistEnabled(Boolean mlAssistEnabled) { + this.mlAssistEnabled = mlAssistEnabled; + return this; + } + + /** + * Get the trainingComputeBinding property: AML compute binding used in training. + * + * @return the trainingComputeBinding value. + */ + public ComputeConfiguration trainingComputeBinding() { + return this.trainingComputeBinding; + } + + /** + * Set the trainingComputeBinding property: AML compute binding used in training. + * + * @param trainingComputeBinding the trainingComputeBinding value to set. + * @return the MLAssistConfiguration object itself. + */ + public MLAssistConfiguration withTrainingComputeBinding(ComputeConfiguration trainingComputeBinding) { + this.trainingComputeBinding = trainingComputeBinding; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (inferencingComputeBinding() != null) { + inferencingComputeBinding().validate(); + } + if (trainingComputeBinding() != null) { + trainingComputeBinding().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateHeaders.java deleted file mode 100644 index 740f059743e8..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesCreateOrUpdateHeaders.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.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The MachineLearningComputesCreateOrUpdateHeaders model. */ -@Fluent -public final class MachineLearningComputesCreateOrUpdateHeaders { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(MachineLearningComputesCreateOrUpdateHeaders.class); - - /* - * The Azure-AsyncOperation property. - */ - @JsonProperty(value = "Azure-AsyncOperation") - private String azureAsyncOperation; - - /** - * Get the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @return the azureAsyncOperation value. - */ - public String azureAsyncOperation() { - return this.azureAsyncOperation; - } - - /** - * Set the azureAsyncOperation property: The Azure-AsyncOperation property. - * - * @param azureAsyncOperation the azureAsyncOperation value to set. - * @return the MachineLearningComputesCreateOrUpdateHeaders object itself. - */ - public MachineLearningComputesCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { - this.azureAsyncOperation = azureAsyncOperation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManagedIdentity.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManagedIdentity.java new file mode 100644 index 000000000000..c7f8f7a5c905 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManagedIdentity.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.UUID; + +/** Managed identity configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") +@JsonTypeName("Managed") +@Fluent +public class ManagedIdentity extends IdentityConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentity.class); + + /* + * Specifies a user-assigned identity by client ID. For system-assigned, do + * not set this field. + */ + @JsonProperty(value = "clientId") + private UUID clientId; + + /* + * Specifies a user-assigned identity by object ID. For system-assigned, do + * not set this field. + */ + @JsonProperty(value = "objectId") + private UUID objectId; + + /* + * Specifies a user-assigned identity by ARM resource ID. For + * system-assigned, do not set this field. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Get the clientId property: Specifies a user-assigned identity by client ID. For system-assigned, do not set this + * field. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.clientId; + } + + /** + * Set the clientId property: Specifies a user-assigned identity by client ID. For system-assigned, do not set this + * field. + * + * @param clientId the clientId value to set. + * @return the ManagedIdentity object itself. + */ + public ManagedIdentity withClientId(UUID clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the objectId property: Specifies a user-assigned identity by object ID. For system-assigned, do not set this + * field. + * + * @return the objectId value. + */ + public UUID objectId() { + return this.objectId; + } + + /** + * Set the objectId property: Specifies a user-assigned identity by object ID. For system-assigned, do not set this + * field. + * + * @param objectId the objectId value to set. + * @return the ManagedIdentity object itself. + */ + public ManagedIdentity withObjectId(UUID objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get the resourceId property: Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not + * set this field. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not + * set this field. + * + * @param resourceId the resourceId value to set. + * @return the ManagedIdentity object itself. + */ + public ManagedIdentity withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManagedOnlineDeployment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManagedOnlineDeployment.java new file mode 100644 index 000000000000..97a47d882576 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManagedOnlineDeployment.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; + +/** The ManagedOnlineDeployment model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") +@JsonTypeName("Managed") +@Fluent +public final class ManagedOnlineDeployment extends OnlineDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedOnlineDeployment.class); + + /* + * Compute instance type. + */ + @JsonProperty(value = "instanceType") + private String instanceType; + + /* + * Deployment container liveness/readiness probe configuration. + */ + @JsonProperty(value = "readinessProbe") + private ProbeSettings readinessProbe; + + /** + * Get the instanceType property: Compute instance type. + * + * @return the instanceType value. + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the instanceType property: Compute instance type. + * + * @param instanceType the instanceType value to set. + * @return the ManagedOnlineDeployment object itself. + */ + public ManagedOnlineDeployment withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + + /** + * Get the readinessProbe property: Deployment container liveness/readiness probe configuration. + * + * @return the readinessProbe value. + */ + public ProbeSettings readinessProbe() { + return this.readinessProbe; + } + + /** + * Set the readinessProbe property: Deployment container liveness/readiness probe configuration. + * + * @param readinessProbe the readinessProbe value to set. + * @return the ManagedOnlineDeployment object itself. + */ + public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { + this.readinessProbe = readinessProbe; + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + super.withAppInsightsEnabled(appInsightsEnabled); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withEnvironmentId(String environmentId) { + super.withEnvironmentId(environmentId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withEnvironmentVariables(Map environmentVariables) { + super.withEnvironmentVariables(environmentVariables); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { + super.withLivenessProbe(livenessProbe); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withModel(AssetReferenceBase model) { + super.withModel(model); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + super.withRequestSettings(requestSettings); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + super.withScaleSettings(scaleSettings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (readinessProbe() != null) { + readinessProbe().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManualScaleSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManualScaleSettings.java new file mode 100644 index 000000000000..e9b4b452afc0 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ManualScaleSettings.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The ManualScaleSettings model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scaleType") +@JsonTypeName("Manual") +@Fluent +public final class ManualScaleSettings extends OnlineScaleSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManualScaleSettings.class); + + /* + * Fixed number of instances for this deployment. + */ + @JsonProperty(value = "instanceCount") + private Integer instanceCount; + + /** + * Get the instanceCount property: Fixed number of instances for this deployment. + * + * @return the instanceCount value. + */ + public Integer instanceCount() { + return this.instanceCount; + } + + /** + * Set the instanceCount property: Fixed number of instances for this deployment. + * + * @param instanceCount the instanceCount value to set. + * @return the ManualScaleSettings object itself. + */ + public ManualScaleSettings withInstanceCount(Integer instanceCount) { + this.instanceCount = instanceCount; + return this; + } + + /** {@inheritDoc} */ + @Override + public ManualScaleSettings withMaxInstances(Integer maxInstances) { + super.withMaxInstances(maxInstances); + return this; + } + + /** {@inheritDoc} */ + @Override + public ManualScaleSettings withMinInstances(Integer minInstances) { + super.withMinInstances(minInstances); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MediaType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MediaType.java new file mode 100644 index 000000000000..0ce44cb68363 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MediaType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for MediaType. */ +public final class MediaType extends ExpandableStringEnum { + /** Static value Image for MediaType. */ + public static final MediaType IMAGE = fromString("Image"); + + /** Static value Text for MediaType. */ + public static final MediaType TEXT = fromString("Text"); + + /** + * Creates or finds a MediaType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaType. + */ + @JsonCreator + public static MediaType fromString(String name) { + return fromString(name, MediaType.class); + } + + /** @return known MediaType values. */ + public static Collection values() { + return values(MediaType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MedianStoppingPolicy.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MedianStoppingPolicy.java new file mode 100644 index 000000000000..b888aecb274b --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MedianStoppingPolicy.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Defines an early termination policy based on running averages of the primary metric of all runs. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") +@JsonTypeName("MedianStopping") +@Fluent +public final class MedianStoppingPolicy extends EarlyTerminationPolicy { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MedianStoppingPolicy.class); + + /** {@inheritDoc} */ + @Override + public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { + super.withDelayEvaluation(delayEvaluation); + return this; + } + + /** {@inheritDoc} */ + @Override + public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Model.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Model.java deleted file mode 100644 index a2c16f00a778..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Model.java +++ /dev/null @@ -1,601 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** An Azure Machine Learning Model. */ -@Fluent -public final class Model { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Model.class); - - /* - * The Model Id. - */ - @JsonProperty(value = "id") - private String id; - - /* - * The Model name. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * The Model framework. - */ - @JsonProperty(value = "framework") - private String framework; - - /* - * The Model framework version. - */ - @JsonProperty(value = "frameworkVersion") - private String frameworkVersion; - - /* - * The Model version assigned by Model Management Service. - */ - @JsonProperty(value = "version") - private Long version; - - /* - * The list of datasets associated with the model. - */ - @JsonProperty(value = "datasets") - private List datasets; - - /* - * The URL of the Model. Usually a SAS URL. - */ - @JsonProperty(value = "url", required = true) - private String url; - - /* - * The MIME type of Model content. For more details about MIME type, please - * open https://www.iana.org/assignments/media-types/media-types.xhtml - */ - @JsonProperty(value = "mimeType", required = true) - private String mimeType; - - /* - * The Model description text. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The Model creation time (UTC). - */ - @JsonProperty(value = "createdTime") - private OffsetDateTime createdTime; - - /* - * The Model last modified time (UTC). - */ - @JsonProperty(value = "modifiedTime") - private OffsetDateTime modifiedTime; - - /* - * Indicates whether we need to unpack the Model during docker Image - * creation. - */ - @JsonProperty(value = "unpack") - private Boolean unpack; - - /* - * The Parent Model Id. - */ - @JsonProperty(value = "parentModelId") - private String parentModelId; - - /* - * The RunId that created this model. - */ - @JsonProperty(value = "runId") - private String runId; - - /* - * The name of the experiment where this model was created. - */ - @JsonProperty(value = "experimentName") - private String experimentName; - - /* - * The Model tag dictionary. Items are mutable. - */ - @JsonProperty(value = "kvTags") - private Map kvTags; - - /* - * The Model property dictionary. Properties are immutable. - */ - @JsonProperty(value = "properties") - private Map properties; - - /* - * Models derived from this model - */ - @JsonProperty(value = "derivedModelIds") - private List derivedModelIds; - - /* - * Sample Input Data for the Model. A reference to a dataset in the - * workspace in the format aml://dataset/{datasetId} - */ - @JsonProperty(value = "sampleInputData") - private String sampleInputData; - - /* - * Sample Output Data for the Model. A reference to a dataset in the - * workspace in the format aml://dataset/{datasetId} - */ - @JsonProperty(value = "sampleOutputData") - private String sampleOutputData; - - /* - * Resource requirements for the model - */ - @JsonProperty(value = "resourceRequirements") - private ContainerResourceRequirements resourceRequirements; - - /** - * Get the id property: The Model Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The Model Id. - * - * @param id the id value to set. - * @return the Model object itself. - */ - public Model withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: The Model name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The Model name. - * - * @param name the name value to set. - * @return the Model object itself. - */ - public Model withName(String name) { - this.name = name; - return this; - } - - /** - * Get the framework property: The Model framework. - * - * @return the framework value. - */ - public String framework() { - return this.framework; - } - - /** - * Set the framework property: The Model framework. - * - * @param framework the framework value to set. - * @return the Model object itself. - */ - public Model withFramework(String framework) { - this.framework = framework; - return this; - } - - /** - * Get the frameworkVersion property: The Model framework version. - * - * @return the frameworkVersion value. - */ - public String frameworkVersion() { - return this.frameworkVersion; - } - - /** - * Set the frameworkVersion property: The Model framework version. - * - * @param frameworkVersion the frameworkVersion value to set. - * @return the Model object itself. - */ - public Model withFrameworkVersion(String frameworkVersion) { - this.frameworkVersion = frameworkVersion; - return this; - } - - /** - * Get the version property: The Model version assigned by Model Management Service. - * - * @return the version value. - */ - public Long version() { - return this.version; - } - - /** - * Set the version property: The Model version assigned by Model Management Service. - * - * @param version the version value to set. - * @return the Model object itself. - */ - public Model withVersion(Long version) { - this.version = version; - return this; - } - - /** - * Get the datasets property: The list of datasets associated with the model. - * - * @return the datasets value. - */ - public List datasets() { - return this.datasets; - } - - /** - * Set the datasets property: The list of datasets associated with the model. - * - * @param datasets the datasets value to set. - * @return the Model object itself. - */ - public Model withDatasets(List datasets) { - this.datasets = datasets; - return this; - } - - /** - * Get the url property: The URL of the Model. Usually a SAS URL. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: The URL of the Model. Usually a SAS URL. - * - * @param url the url value to set. - * @return the Model object itself. - */ - public Model withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the mimeType property: The MIME type of Model content. For more details about MIME type, please open - * https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * @return the mimeType value. - */ - public String mimeType() { - return this.mimeType; - } - - /** - * Set the mimeType property: The MIME type of Model content. For more details about MIME type, please open - * https://www.iana.org/assignments/media-types/media-types.xhtml. - * - * @param mimeType the mimeType value to set. - * @return the Model object itself. - */ - public Model withMimeType(String mimeType) { - this.mimeType = mimeType; - return this; - } - - /** - * Get the description property: The Model description text. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The Model description text. - * - * @param description the description value to set. - * @return the Model object itself. - */ - public Model withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the createdTime property: The Model creation time (UTC). - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.createdTime; - } - - /** - * Set the createdTime property: The Model creation time (UTC). - * - * @param createdTime the createdTime value to set. - * @return the Model object itself. - */ - public Model withCreatedTime(OffsetDateTime createdTime) { - this.createdTime = createdTime; - return this; - } - - /** - * Get the modifiedTime property: The Model last modified time (UTC). - * - * @return the modifiedTime value. - */ - public OffsetDateTime modifiedTime() { - return this.modifiedTime; - } - - /** - * Set the modifiedTime property: The Model last modified time (UTC). - * - * @param modifiedTime the modifiedTime value to set. - * @return the Model object itself. - */ - public Model withModifiedTime(OffsetDateTime modifiedTime) { - this.modifiedTime = modifiedTime; - return this; - } - - /** - * Get the unpack property: Indicates whether we need to unpack the Model during docker Image creation. - * - * @return the unpack value. - */ - public Boolean unpack() { - return this.unpack; - } - - /** - * Set the unpack property: Indicates whether we need to unpack the Model during docker Image creation. - * - * @param unpack the unpack value to set. - * @return the Model object itself. - */ - public Model withUnpack(Boolean unpack) { - this.unpack = unpack; - return this; - } - - /** - * Get the parentModelId property: The Parent Model Id. - * - * @return the parentModelId value. - */ - public String parentModelId() { - return this.parentModelId; - } - - /** - * Set the parentModelId property: The Parent Model Id. - * - * @param parentModelId the parentModelId value to set. - * @return the Model object itself. - */ - public Model withParentModelId(String parentModelId) { - this.parentModelId = parentModelId; - return this; - } - - /** - * Get the runId property: The RunId that created this model. - * - * @return the runId value. - */ - public String runId() { - return this.runId; - } - - /** - * Set the runId property: The RunId that created this model. - * - * @param runId the runId value to set. - * @return the Model object itself. - */ - public Model withRunId(String runId) { - this.runId = runId; - return this; - } - - /** - * Get the experimentName property: The name of the experiment where this model was created. - * - * @return the experimentName value. - */ - public String experimentName() { - return this.experimentName; - } - - /** - * Set the experimentName property: The name of the experiment where this model was created. - * - * @param experimentName the experimentName value to set. - * @return the Model object itself. - */ - public Model withExperimentName(String experimentName) { - this.experimentName = experimentName; - return this; - } - - /** - * Get the kvTags property: The Model tag dictionary. Items are mutable. - * - * @return the kvTags value. - */ - public Map kvTags() { - return this.kvTags; - } - - /** - * Set the kvTags property: The Model tag dictionary. Items are mutable. - * - * @param kvTags the kvTags value to set. - * @return the Model object itself. - */ - public Model withKvTags(Map kvTags) { - this.kvTags = kvTags; - return this; - } - - /** - * Get the properties property: The Model property dictionary. Properties are immutable. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: The Model property dictionary. Properties are immutable. - * - * @param properties the properties value to set. - * @return the Model object itself. - */ - public Model withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the derivedModelIds property: Models derived from this model. - * - * @return the derivedModelIds value. - */ - public List derivedModelIds() { - return this.derivedModelIds; - } - - /** - * Set the derivedModelIds property: Models derived from this model. - * - * @param derivedModelIds the derivedModelIds value to set. - * @return the Model object itself. - */ - public Model withDerivedModelIds(List derivedModelIds) { - this.derivedModelIds = derivedModelIds; - return this; - } - - /** - * Get the sampleInputData property: Sample Input Data for the Model. A reference to a dataset in the workspace in - * the format aml://dataset/{datasetId}. - * - * @return the sampleInputData value. - */ - public String sampleInputData() { - return this.sampleInputData; - } - - /** - * Set the sampleInputData property: Sample Input Data for the Model. A reference to a dataset in the workspace in - * the format aml://dataset/{datasetId}. - * - * @param sampleInputData the sampleInputData value to set. - * @return the Model object itself. - */ - public Model withSampleInputData(String sampleInputData) { - this.sampleInputData = sampleInputData; - return this; - } - - /** - * Get the sampleOutputData property: Sample Output Data for the Model. A reference to a dataset in the workspace in - * the format aml://dataset/{datasetId}. - * - * @return the sampleOutputData value. - */ - public String sampleOutputData() { - return this.sampleOutputData; - } - - /** - * Set the sampleOutputData property: Sample Output Data for the Model. A reference to a dataset in the workspace in - * the format aml://dataset/{datasetId}. - * - * @param sampleOutputData the sampleOutputData value to set. - * @return the Model object itself. - */ - public Model withSampleOutputData(String sampleOutputData) { - this.sampleOutputData = sampleOutputData; - return this; - } - - /** - * Get the resourceRequirements property: Resource requirements for the model. - * - * @return the resourceRequirements value. - */ - public ContainerResourceRequirements resourceRequirements() { - return this.resourceRequirements; - } - - /** - * Set the resourceRequirements property: Resource requirements for the model. - * - * @param resourceRequirements the resourceRequirements value to set. - * @return the Model object itself. - */ - public Model withResourceRequirements(ContainerResourceRequirements resourceRequirements) { - this.resourceRequirements = resourceRequirements; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Model")); - } - if (datasets() != null) { - datasets().forEach(e -> e.validate()); - } - if (url() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property url in model Model")); - } - if (mimeType() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property mimeType in model Model")); - } - if (resourceRequirements() != null) { - resourceRequirements().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainer.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainer.java new file mode 100644 index 000000000000..9a3743e34ba8 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainer.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The ModelContainer model. */ +@Fluent +public final class ModelContainer { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelContainer.class); + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the ModelContainer object itself. + */ + public ModelContainer withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the ModelContainer object itself. + */ + public ModelContainer withProperties(Map properties) { + this.properties = properties; + 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 ModelContainer object itself. + */ + public ModelContainer withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainerResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainerResource.java new file mode 100644 index 000000000000..c371dafe8b2c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainerResource.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelContainerResourceInner; + +/** An immutable client-side representation of ModelContainerResource. */ +public interface ModelContainerResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + ModelContainer properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ModelContainerResourceInner + * object. + * + * @return the inner object. + */ + ModelContainerResourceInner innerModel(); + + /** The entirety of the ModelContainerResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The ModelContainerResource definition stages. */ + interface DefinitionStages { + /** The first stage of the ModelContainerResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the ModelContainerResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the ModelContainerResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(ModelContainer properties); + } + /** + * The stage of the ModelContainerResource 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. + */ + ModelContainerResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ModelContainerResource create(Context context); + } + } + /** + * Begins update for the ModelContainerResource resource. + * + * @return the stage of resource update. + */ + ModelContainerResource.Update update(); + + /** The template for ModelContainerResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ModelContainerResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ModelContainerResource apply(Context context); + } + /** The ModelContainerResource update stages. */ + interface UpdateStages { + /** The stage of the ModelContainerResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(ModelContainer properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ModelContainerResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ModelContainerResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainerResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainerResourceArmPaginatedResult.java new file mode 100644 index 000000000000..475f2ebc8200 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainerResourceArmPaginatedResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelContainerResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of ModelContainer entities. */ +@Fluent +public final class ModelContainerResourceArmPaginatedResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelContainerResourceArmPaginatedResult.class); + + /* + * The link to the next page of ModelContainer objects. If null, there are + * no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type ModelContainer. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of ModelContainer 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 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; + } + + /** + * Get the value property: An array of objects of type ModelContainer. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainers.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainers.java new file mode 100644 index 000000000000..ca8c0e0f7eb8 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelContainers.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 ModelContainers. */ +public interface ModelContainers { + /** + * List model 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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 skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list( + String resourceGroupName, String workspaceName, String skip, Integer count, Context context); + + /** + * Delete container. + * + * @param name Container 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. + */ + void delete(String name, String resourceGroupName, String workspaceName); + + /** + * Delete container. + * + * @param name Container name. + * @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. + */ + Response deleteWithResponse(String name, String resourceGroupName, String workspaceName, Context context); + + /** + * Get container. + * + * @param name Container 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 container. + */ + ModelContainerResource get(String name, String resourceGroupName, String workspaceName); + + /** + * Get container. + * + * @param name Container name. + * @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 container. + */ + Response getWithResponse( + String name, String resourceGroupName, String workspaceName, Context context); + + /** + * 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. + */ + ModelContainerResource getById(String id); + + /** + * Get container. + * + * @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 container. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete 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. + */ + void deleteById(String id); + + /** + * Delete container. + * + * @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. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ModelContainerResource resource. + * + * @param name resource name. + * @return the first stage of the new ModelContainerResource definition. + */ + ModelContainerResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDataCollection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDataCollection.java deleted file mode 100644 index 29190b688634..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDataCollection.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Model data collection properties. */ -@Fluent -public class ModelDataCollection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelDataCollection.class); - - /* - * Option for enabling/disabling Event Hub. - */ - @JsonProperty(value = "eventHubEnabled") - private Boolean eventHubEnabled; - - /* - * Option for enabling/disabling storage. - */ - @JsonProperty(value = "storageEnabled") - private Boolean storageEnabled; - - /** - * Get the eventHubEnabled property: Option for enabling/disabling Event Hub. - * - * @return the eventHubEnabled value. - */ - public Boolean eventHubEnabled() { - return this.eventHubEnabled; - } - - /** - * Set the eventHubEnabled property: Option for enabling/disabling Event Hub. - * - * @param eventHubEnabled the eventHubEnabled value to set. - * @return the ModelDataCollection object itself. - */ - public ModelDataCollection withEventHubEnabled(Boolean eventHubEnabled) { - this.eventHubEnabled = eventHubEnabled; - return this; - } - - /** - * Get the storageEnabled property: Option for enabling/disabling storage. - * - * @return the storageEnabled value. - */ - public Boolean storageEnabled() { - return this.storageEnabled; - } - - /** - * Set the storageEnabled property: Option for enabling/disabling storage. - * - * @param storageEnabled the storageEnabled value to set. - * @return the ModelDataCollection object itself. - */ - public ModelDataCollection withStorageEnabled(Boolean storageEnabled) { - this.storageEnabled = storageEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSection.java deleted file mode 100644 index b19bbe29de9b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSection.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ModelDockerSection model. */ -@Fluent -public class ModelDockerSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelDockerSection.class); - - /* - * Base image used for Docker-based runs. Mutually exclusive with - * BaseDockerfile. - */ - @JsonProperty(value = "baseImage") - private String baseImage; - - /* - * Base Dockerfile used for Docker-based runs. Mutually exclusive with - * BaseImage. - */ - @JsonProperty(value = "baseDockerfile") - private String baseDockerfile; - - /* - * Image registry that contains the base image. - */ - @JsonProperty(value = "baseImageRegistry") - private ModelDockerSectionBaseImageRegistry baseImageRegistry; - - /** - * Get the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - * - * @return the baseImage value. - */ - public String baseImage() { - return this.baseImage; - } - - /** - * Set the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - * - * @param baseImage the baseImage value to set. - * @return the ModelDockerSection object itself. - */ - public ModelDockerSection withBaseImage(String baseImage) { - this.baseImage = baseImage; - return this; - } - - /** - * Get the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - * - * @return the baseDockerfile value. - */ - public String baseDockerfile() { - return this.baseDockerfile; - } - - /** - * Set the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - * - * @param baseDockerfile the baseDockerfile value to set. - * @return the ModelDockerSection object itself. - */ - public ModelDockerSection withBaseDockerfile(String baseDockerfile) { - this.baseDockerfile = baseDockerfile; - return this; - } - - /** - * Get the baseImageRegistry property: Image registry that contains the base image. - * - * @return the baseImageRegistry value. - */ - public ModelDockerSectionBaseImageRegistry baseImageRegistry() { - return this.baseImageRegistry; - } - - /** - * Set the baseImageRegistry property: Image registry that contains the base image. - * - * @param baseImageRegistry the baseImageRegistry value to set. - * @return the ModelDockerSection object itself. - */ - public ModelDockerSection withBaseImageRegistry(ModelDockerSectionBaseImageRegistry baseImageRegistry) { - this.baseImageRegistry = baseImageRegistry; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (baseImageRegistry() != null) { - baseImageRegistry().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionBaseImageRegistry.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionBaseImageRegistry.java deleted file mode 100644 index 05f34bf6d7f1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionBaseImageRegistry.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.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Image registry that contains the base image. */ -@Immutable -public final class ModelDockerSectionBaseImageRegistry extends ContainerRegistry { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelDockerSectionBaseImageRegistry.class); - - /** {@inheritDoc} */ - @Override - public ModelDockerSectionBaseImageRegistry withAddress(String address) { - super.withAddress(address); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelDockerSectionBaseImageRegistry withUsername(String username) { - super.withUsername(username); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelDockerSectionBaseImageRegistry withPassword(String password) { - super.withPassword(password); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponse.java deleted file mode 100644 index bb426053edd5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelDockerSectionResponse.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ModelDockerSectionResponse model. */ -@Fluent -public class ModelDockerSectionResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelDockerSectionResponse.class); - - /* - * Base image used for Docker-based runs. Mutually exclusive with - * BaseDockerfile. - */ - @JsonProperty(value = "baseImage") - private String baseImage; - - /* - * Base Dockerfile used for Docker-based runs. Mutually exclusive with - * BaseImage. - */ - @JsonProperty(value = "baseDockerfile") - private String baseDockerfile; - - /* - * Image registry that contains the base image. - */ - @JsonProperty(value = "baseImageRegistry") - private ModelDockerSectionResponseBaseImageRegistry baseImageRegistry; - - /** - * Get the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - * - * @return the baseImage value. - */ - public String baseImage() { - return this.baseImage; - } - - /** - * Set the baseImage property: Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. - * - * @param baseImage the baseImage value to set. - * @return the ModelDockerSectionResponse object itself. - */ - public ModelDockerSectionResponse withBaseImage(String baseImage) { - this.baseImage = baseImage; - return this; - } - - /** - * Get the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - * - * @return the baseDockerfile value. - */ - public String baseDockerfile() { - return this.baseDockerfile; - } - - /** - * Set the baseDockerfile property: Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. - * - * @param baseDockerfile the baseDockerfile value to set. - * @return the ModelDockerSectionResponse object itself. - */ - public ModelDockerSectionResponse withBaseDockerfile(String baseDockerfile) { - this.baseDockerfile = baseDockerfile; - return this; - } - - /** - * Get the baseImageRegistry property: Image registry that contains the base image. - * - * @return the baseImageRegistry value. - */ - public ModelDockerSectionResponseBaseImageRegistry baseImageRegistry() { - return this.baseImageRegistry; - } - - /** - * Set the baseImageRegistry property: Image registry that contains the base image. - * - * @param baseImageRegistry the baseImageRegistry value to set. - * @return the ModelDockerSectionResponse object itself. - */ - public ModelDockerSectionResponse withBaseImageRegistry( - ModelDockerSectionResponseBaseImageRegistry baseImageRegistry) { - this.baseImageRegistry = baseImageRegistry; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (baseImageRegistry() != null) { - baseImageRegistry().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinition.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinition.java deleted file mode 100644 index cf2a9c9131af..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinition.java +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The ModelEnvironmentDefinition model. */ -@Fluent -public class ModelEnvironmentDefinition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinition.class); - - /* - * The name of the environment. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The environment version. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Settings for a Python environment. - */ - @JsonProperty(value = "python") - private ModelEnvironmentDefinitionPython python; - - /* - * Definition of environment variables to be defined in the environment. - */ - @JsonProperty(value = "environmentVariables") - private Map environmentVariables; - - /* - * The definition of a Docker container. - */ - @JsonProperty(value = "docker") - private ModelEnvironmentDefinitionDocker docker; - - /* - * The configuration for a Spark environment. - */ - @JsonProperty(value = "spark") - private ModelEnvironmentDefinitionSpark spark; - - /* - * Settings for a R environment. - */ - @JsonProperty(value = "r") - private ModelEnvironmentDefinitionR r; - - /* - * The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - */ - @JsonProperty(value = "inferencingStackVersion") - private String inferencingStackVersion; - - /** - * Get the name property: The name of the environment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the environment. - * - * @param name the name value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: The environment version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The environment version. - * - * @param version the version value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the python property: Settings for a Python environment. - * - * @return the python value. - */ - public ModelEnvironmentDefinitionPython python() { - return this.python; - } - - /** - * Set the python property: Settings for a Python environment. - * - * @param python the python value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withPython(ModelEnvironmentDefinitionPython python) { - this.python = python; - return this; - } - - /** - * Get the environmentVariables property: Definition of environment variables to be defined in the environment. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Definition of environment variables to be defined in the environment. - * - * @param environmentVariables the environmentVariables value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the docker property: The definition of a Docker container. - * - * @return the docker value. - */ - public ModelEnvironmentDefinitionDocker docker() { - return this.docker; - } - - /** - * Set the docker property: The definition of a Docker container. - * - * @param docker the docker value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withDocker(ModelEnvironmentDefinitionDocker docker) { - this.docker = docker; - return this; - } - - /** - * Get the spark property: The configuration for a Spark environment. - * - * @return the spark value. - */ - public ModelEnvironmentDefinitionSpark spark() { - return this.spark; - } - - /** - * Set the spark property: The configuration for a Spark environment. - * - * @param spark the spark value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withSpark(ModelEnvironmentDefinitionSpark spark) { - this.spark = spark; - return this; - } - - /** - * Get the r property: Settings for a R environment. - * - * @return the r value. - */ - public ModelEnvironmentDefinitionR r() { - return this.r; - } - - /** - * Set the r property: Settings for a R environment. - * - * @param r the r value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withR(ModelEnvironmentDefinitionR r) { - this.r = r; - return this; - } - - /** - * Get the inferencingStackVersion property: The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - * - * @return the inferencingStackVersion value. - */ - public String inferencingStackVersion() { - return this.inferencingStackVersion; - } - - /** - * Set the inferencingStackVersion property: The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - * - * @param inferencingStackVersion the inferencingStackVersion value to set. - * @return the ModelEnvironmentDefinition object itself. - */ - public ModelEnvironmentDefinition withInferencingStackVersion(String inferencingStackVersion) { - this.inferencingStackVersion = inferencingStackVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (python() != null) { - python().validate(); - } - if (docker() != null) { - docker().validate(); - } - if (spark() != null) { - spark().validate(); - } - if (r() != null) { - r().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionDocker.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionDocker.java deleted file mode 100644 index 87501eeef023..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionDocker.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The definition of a Docker container. */ -@Immutable -public final class ModelEnvironmentDefinitionDocker extends ModelDockerSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionDocker.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionDocker withBaseImage(String baseImage) { - super.withBaseImage(baseImage); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionDocker withBaseDockerfile(String baseDockerfile) { - super.withBaseDockerfile(baseDockerfile); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionDocker withBaseImageRegistry( - ModelDockerSectionBaseImageRegistry baseImageRegistry) { - super.withBaseImageRegistry(baseImageRegistry); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionPython.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionPython.java deleted file mode 100644 index 71163545b408..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionPython.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Settings for a Python environment. */ -@Immutable -public final class ModelEnvironmentDefinitionPython extends ModelPythonSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionPython.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionPython withInterpreterPath(String interpreterPath) { - super.withInterpreterPath(interpreterPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionPython withUserManagedDependencies(Boolean userManagedDependencies) { - super.withUserManagedDependencies(userManagedDependencies); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionPython withCondaDependencies(Object condaDependencies) { - super.withCondaDependencies(condaDependencies); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionPython withBaseCondaEnvironment(String baseCondaEnvironment) { - super.withBaseCondaEnvironment(baseCondaEnvironment); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionR.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionR.java deleted file mode 100644 index 463559c627aa..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionR.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** Settings for a R environment. */ -@Immutable -public final class ModelEnvironmentDefinitionR extends RSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionR.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withRVersion(String rVersion) { - super.withRVersion(rVersion); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withUserManaged(Boolean userManaged) { - super.withUserManaged(userManaged); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withRscriptPath(String rscriptPath) { - super.withRscriptPath(rscriptPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withSnapshotDate(String snapshotDate) { - super.withSnapshotDate(snapshotDate); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withCranPackages(List cranPackages) { - super.withCranPackages(cranPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withGitHubPackages(List gitHubPackages) { - super.withGitHubPackages(gitHubPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withCustomUrlPackages(List customUrlPackages) { - super.withCustomUrlPackages(customUrlPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionR withBioConductorPackages(List bioConductorPackages) { - super.withBioConductorPackages(bioConductorPackages); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponse.java deleted file mode 100644 index 9386e0f31549..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponse.java +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The ModelEnvironmentDefinitionResponse model. */ -@Fluent -public class ModelEnvironmentDefinitionResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponse.class); - - /* - * The name of the environment. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The environment version. - */ - @JsonProperty(value = "version") - private String version; - - /* - * Settings for a Python environment. - */ - @JsonProperty(value = "python") - private ModelEnvironmentDefinitionResponsePython python; - - /* - * Definition of environment variables to be defined in the environment. - */ - @JsonProperty(value = "environmentVariables") - private Map environmentVariables; - - /* - * The definition of a Docker container. - */ - @JsonProperty(value = "docker") - private ModelEnvironmentDefinitionResponseDocker docker; - - /* - * The configuration for a Spark environment. - */ - @JsonProperty(value = "spark") - private ModelEnvironmentDefinitionResponseSpark spark; - - /* - * Settings for a R environment. - */ - @JsonProperty(value = "r") - private ModelEnvironmentDefinitionResponseR r; - - /* - * The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - */ - @JsonProperty(value = "inferencingStackVersion") - private String inferencingStackVersion; - - /** - * Get the name property: The name of the environment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the environment. - * - * @param name the name value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: The environment version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The environment version. - * - * @param version the version value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the python property: Settings for a Python environment. - * - * @return the python value. - */ - public ModelEnvironmentDefinitionResponsePython python() { - return this.python; - } - - /** - * Set the python property: Settings for a Python environment. - * - * @param python the python value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withPython(ModelEnvironmentDefinitionResponsePython python) { - this.python = python; - return this; - } - - /** - * Get the environmentVariables property: Definition of environment variables to be defined in the environment. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Definition of environment variables to be defined in the environment. - * - * @param environmentVariables the environmentVariables value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the docker property: The definition of a Docker container. - * - * @return the docker value. - */ - public ModelEnvironmentDefinitionResponseDocker docker() { - return this.docker; - } - - /** - * Set the docker property: The definition of a Docker container. - * - * @param docker the docker value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withDocker(ModelEnvironmentDefinitionResponseDocker docker) { - this.docker = docker; - return this; - } - - /** - * Get the spark property: The configuration for a Spark environment. - * - * @return the spark value. - */ - public ModelEnvironmentDefinitionResponseSpark spark() { - return this.spark; - } - - /** - * Set the spark property: The configuration for a Spark environment. - * - * @param spark the spark value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withSpark(ModelEnvironmentDefinitionResponseSpark spark) { - this.spark = spark; - return this; - } - - /** - * Get the r property: Settings for a R environment. - * - * @return the r value. - */ - public ModelEnvironmentDefinitionResponseR r() { - return this.r; - } - - /** - * Set the r property: Settings for a R environment. - * - * @param r the r value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withR(ModelEnvironmentDefinitionResponseR r) { - this.r = r; - return this; - } - - /** - * Get the inferencingStackVersion property: The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - * - * @return the inferencingStackVersion value. - */ - public String inferencingStackVersion() { - return this.inferencingStackVersion; - } - - /** - * Set the inferencingStackVersion property: The inferencing stack version added to the image. To avoid adding an - * inferencing stack, do not set this value. Valid values: "latest". - * - * @param inferencingStackVersion the inferencingStackVersion value to set. - * @return the ModelEnvironmentDefinitionResponse object itself. - */ - public ModelEnvironmentDefinitionResponse withInferencingStackVersion(String inferencingStackVersion) { - this.inferencingStackVersion = inferencingStackVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (python() != null) { - python().validate(); - } - if (docker() != null) { - docker().validate(); - } - if (spark() != null) { - spark().validate(); - } - if (r() != null) { - r().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseDocker.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseDocker.java deleted file mode 100644 index 4fc43ea55f64..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseDocker.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The definition of a Docker container. */ -@Immutable -public final class ModelEnvironmentDefinitionResponseDocker extends ModelDockerSectionResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponseDocker.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseDocker withBaseImage(String baseImage) { - super.withBaseImage(baseImage); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseDocker withBaseDockerfile(String baseDockerfile) { - super.withBaseDockerfile(baseDockerfile); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseDocker withBaseImageRegistry( - ModelDockerSectionResponseBaseImageRegistry baseImageRegistry) { - super.withBaseImageRegistry(baseImageRegistry); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponsePython.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponsePython.java deleted file mode 100644 index 728354b3fd67..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponsePython.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** Settings for a Python environment. */ -@Immutable -public final class ModelEnvironmentDefinitionResponsePython extends ModelPythonSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponsePython.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponsePython withInterpreterPath(String interpreterPath) { - super.withInterpreterPath(interpreterPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponsePython withUserManagedDependencies(Boolean userManagedDependencies) { - super.withUserManagedDependencies(userManagedDependencies); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponsePython withCondaDependencies(Object condaDependencies) { - super.withCondaDependencies(condaDependencies); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponsePython withBaseCondaEnvironment(String baseCondaEnvironment) { - super.withBaseCondaEnvironment(baseCondaEnvironment); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseR.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseR.java deleted file mode 100644 index 68a5322bf7c0..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseR.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** Settings for a R environment. */ -@Immutable -public final class ModelEnvironmentDefinitionResponseR extends RSectionResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponseR.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withRVersion(String rVersion) { - super.withRVersion(rVersion); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withUserManaged(Boolean userManaged) { - super.withUserManaged(userManaged); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withRscriptPath(String rscriptPath) { - super.withRscriptPath(rscriptPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withSnapshotDate(String snapshotDate) { - super.withSnapshotDate(snapshotDate); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withCranPackages(List cranPackages) { - super.withCranPackages(cranPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withGitHubPackages(List gitHubPackages) { - super.withGitHubPackages(gitHubPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withCustomUrlPackages(List customUrlPackages) { - super.withCustomUrlPackages(customUrlPackages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseR withBioConductorPackages(List bioConductorPackages) { - super.withBioConductorPackages(bioConductorPackages); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseSpark.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseSpark.java deleted file mode 100644 index fa7fddf6f4b4..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionResponseSpark.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The configuration for a Spark environment. */ -@Immutable -public final class ModelEnvironmentDefinitionResponseSpark extends ModelSparkSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionResponseSpark.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseSpark withRepositories(List repositories) { - super.withRepositories(repositories); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseSpark withPackages(List packages) { - super.withPackages(packages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionResponseSpark withPrecachePackages(Boolean precachePackages) { - super.withPrecachePackages(precachePackages); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionSpark.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionSpark.java deleted file mode 100644 index 9479542c2fb5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelEnvironmentDefinitionSpark.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; - -/** The configuration for a Spark environment. */ -@Immutable -public final class ModelEnvironmentDefinitionSpark extends ModelSparkSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelEnvironmentDefinitionSpark.class); - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionSpark withRepositories(List repositories) { - super.withRepositories(repositories); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionSpark withPackages(List packages) { - super.withPackages(packages); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelEnvironmentDefinitionSpark withPrecachePackages(Boolean precachePackages) { - super.withPrecachePackages(precachePackages); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelPythonSection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelPythonSection.java deleted file mode 100644 index e1fbaca84de7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelPythonSection.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ModelPythonSection model. */ -@Fluent -public class ModelPythonSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelPythonSection.class); - - /* - * The python interpreter path to use if an environment build is not - * required. The path specified gets used to call the user script. - */ - @JsonProperty(value = "interpreterPath") - private String interpreterPath; - - /* - * True means that AzureML reuses an existing python environment; False - * means that AzureML will create a python environment based on the Conda - * dependencies specification. - */ - @JsonProperty(value = "userManagedDependencies") - private Boolean userManagedDependencies; - - /* - * A JObject containing Conda dependencies. - */ - @JsonProperty(value = "condaDependencies") - private Object condaDependencies; - - /* - * The baseCondaEnvironment property. - */ - @JsonProperty(value = "baseCondaEnvironment") - private String baseCondaEnvironment; - - /** - * Get the interpreterPath property: The python interpreter path to use if an environment build is not required. The - * path specified gets used to call the user script. - * - * @return the interpreterPath value. - */ - public String interpreterPath() { - return this.interpreterPath; - } - - /** - * Set the interpreterPath property: The python interpreter path to use if an environment build is not required. The - * path specified gets used to call the user script. - * - * @param interpreterPath the interpreterPath value to set. - * @return the ModelPythonSection object itself. - */ - public ModelPythonSection withInterpreterPath(String interpreterPath) { - this.interpreterPath = interpreterPath; - return this; - } - - /** - * Get the userManagedDependencies property: True means that AzureML reuses an existing python environment; False - * means that AzureML will create a python environment based on the Conda dependencies specification. - * - * @return the userManagedDependencies value. - */ - public Boolean userManagedDependencies() { - return this.userManagedDependencies; - } - - /** - * Set the userManagedDependencies property: True means that AzureML reuses an existing python environment; False - * means that AzureML will create a python environment based on the Conda dependencies specification. - * - * @param userManagedDependencies the userManagedDependencies value to set. - * @return the ModelPythonSection object itself. - */ - public ModelPythonSection withUserManagedDependencies(Boolean userManagedDependencies) { - this.userManagedDependencies = userManagedDependencies; - return this; - } - - /** - * Get the condaDependencies property: A JObject containing Conda dependencies. - * - * @return the condaDependencies value. - */ - public Object condaDependencies() { - return this.condaDependencies; - } - - /** - * Set the condaDependencies property: A JObject containing Conda dependencies. - * - * @param condaDependencies the condaDependencies value to set. - * @return the ModelPythonSection object itself. - */ - public ModelPythonSection withCondaDependencies(Object condaDependencies) { - this.condaDependencies = condaDependencies; - return this; - } - - /** - * Get the baseCondaEnvironment property: The baseCondaEnvironment property. - * - * @return the baseCondaEnvironment value. - */ - public String baseCondaEnvironment() { - return this.baseCondaEnvironment; - } - - /** - * Set the baseCondaEnvironment property: The baseCondaEnvironment property. - * - * @param baseCondaEnvironment the baseCondaEnvironment value to set. - * @return the ModelPythonSection object itself. - */ - public ModelPythonSection withBaseCondaEnvironment(String baseCondaEnvironment) { - this.baseCondaEnvironment = baseCondaEnvironment; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelSparkSection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelSparkSection.java deleted file mode 100644 index 7e9c84572afd..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelSparkSection.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The ModelSparkSection model. */ -@Fluent -public class ModelSparkSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelSparkSection.class); - - /* - * The list of spark repositories. - */ - @JsonProperty(value = "repositories") - private List repositories; - - /* - * The Spark packages to use. - */ - @JsonProperty(value = "packages") - private List packages; - - /* - * Whether to precache the packages. - */ - @JsonProperty(value = "precachePackages") - private Boolean precachePackages; - - /** - * Get the repositories property: The list of spark repositories. - * - * @return the repositories value. - */ - public List repositories() { - return this.repositories; - } - - /** - * Set the repositories property: The list of spark repositories. - * - * @param repositories the repositories value to set. - * @return the ModelSparkSection object itself. - */ - public ModelSparkSection withRepositories(List repositories) { - this.repositories = repositories; - return this; - } - - /** - * Get the packages property: The Spark packages to use. - * - * @return the packages value. - */ - public List packages() { - return this.packages; - } - - /** - * Set the packages property: The Spark packages to use. - * - * @param packages the packages value to set. - * @return the ModelSparkSection object itself. - */ - public ModelSparkSection withPackages(List packages) { - this.packages = packages; - return this; - } - - /** - * Get the precachePackages property: Whether to precache the packages. - * - * @return the precachePackages value. - */ - public Boolean precachePackages() { - return this.precachePackages; - } - - /** - * Set the precachePackages property: Whether to precache the packages. - * - * @param precachePackages the precachePackages value to set. - * @return the ModelSparkSection object itself. - */ - public ModelSparkSection withPrecachePackages(Boolean precachePackages) { - this.precachePackages = precachePackages; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (packages() != null) { - packages().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersion.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersion.java new file mode 100644 index 000000000000..c16b7ad1de0a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersion.java @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Model asset version details. */ +@Fluent +public final class ModelVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelVersion.class); + + /* + * ARM resource ID of the datastore where the asset is located. + */ + @JsonProperty(value = "datastoreId") + private String datastoreId; + + /* + * The asset description text. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Mapping of model flavors to their properties. + */ + @JsonProperty(value = "flavors") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map flavors; + + /* + * If the name version are system generated (anonymous registration). + */ + @JsonProperty(value = "isAnonymous") + private Boolean isAnonymous; + + /* + * The path of the file/directory in the datastore. + */ + @JsonProperty(value = "path", required = true) + private String path; + + /* + * The asset property dictionary. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. + * + * @return the datastoreId value. + */ + public String datastoreId() { + return this.datastoreId; + } + + /** + * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. + * + * @param datastoreId the datastoreId value to set. + * @return the ModelVersion object itself. + */ + public ModelVersion withDatastoreId(String datastoreId) { + this.datastoreId = datastoreId; + return this; + } + + /** + * Get the description property: The asset description text. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The asset description text. + * + * @param description the description value to set. + * @return the ModelVersion object itself. + */ + public ModelVersion withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the flavors property: Mapping of model flavors to their properties. + * + * @return the flavors value. + */ + public Map flavors() { + return this.flavors; + } + + /** + * Set the flavors property: Mapping of model flavors to their properties. + * + * @param flavors the flavors value to set. + * @return the ModelVersion object itself. + */ + public ModelVersion withFlavors(Map flavors) { + this.flavors = flavors; + return this; + } + + /** + * Get the isAnonymous property: If the name version are system generated (anonymous registration). + * + * @return the isAnonymous value. + */ + public Boolean isAnonymous() { + return this.isAnonymous; + } + + /** + * Set the isAnonymous property: If the name version are system generated (anonymous registration). + * + * @param isAnonymous the isAnonymous value to set. + * @return the ModelVersion object itself. + */ + public ModelVersion withIsAnonymous(Boolean isAnonymous) { + this.isAnonymous = isAnonymous; + return this; + } + + /** + * 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 ModelVersion object itself. + */ + public ModelVersion withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the properties property: The asset property dictionary. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: The asset property dictionary. + * + * @param properties the properties value to set. + * @return the ModelVersion object itself. + */ + public ModelVersion withProperties(Map properties) { + this.properties = properties; + 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 ModelVersion object itself. + */ + public ModelVersion withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (flavors() != null) { + flavors() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (path() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property path in model ModelVersion")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersionResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersionResource.java new file mode 100644 index 000000000000..bb7d08037173 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersionResource.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelVersionResourceInner; + +/** An immutable client-side representation of ModelVersionResource. */ +public interface ModelVersionResource { + /** + * 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: Additional attributes of the entity. + * + * @return the properties value. + */ + ModelVersion properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ModelVersionResourceInner object. + * + * @return the inner object. + */ + ModelVersionResourceInner innerModel(); + + /** The entirety of the ModelVersionResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The ModelVersionResource definition stages. */ + interface DefinitionStages { + /** The first stage of the ModelVersionResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the ModelVersionResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies name, resourceGroupName, workspaceName. + * + * @param name Container name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingModel(String name, String resourceGroupName, String workspaceName); + } + /** The stage of the ModelVersionResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(ModelVersion properties); + } + /** + * The stage of the ModelVersionResource 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. + */ + ModelVersionResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ModelVersionResource create(Context context); + } + } + /** + * Begins update for the ModelVersionResource resource. + * + * @return the stage of resource update. + */ + ModelVersionResource.Update update(); + + /** The template for ModelVersionResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ModelVersionResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ModelVersionResource apply(Context context); + } + /** The ModelVersionResource update stages. */ + interface UpdateStages { + /** The stage of the ModelVersionResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(ModelVersion properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ModelVersionResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ModelVersionResource refresh(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersionResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersionResourceArmPaginatedResult.java new file mode 100644 index 000000000000..88c504e07354 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersionResourceArmPaginatedResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.ModelVersionResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of ModelVersion entities. */ +@Fluent +public final class ModelVersionResourceArmPaginatedResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ModelVersionResourceArmPaginatedResult.class); + + /* + * The link to the next page of ModelVersion objects. If null, there are no + * additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type ModelVersion. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of ModelVersion 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 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; + } + + /** + * Get the value property: An array of objects of type ModelVersion. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServices.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersions.java similarity index 59% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServices.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersions.java index 8ed27e049b41..b7d6b8a911ce 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningServices.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ModelVersions.java @@ -8,138 +8,139 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of MachineLearningServices. */ -public interface MachineLearningServices { +/** Resource collection API of ModelVersions. */ +public interface ModelVersions { /** - * Gets services in specified workspace. + * List model versions. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param name Model 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 services in specified workspace. + * @return a paginated list of ModelVersion entities. */ - PagedIterable listByWorkspace(String resourceGroupName, String workspaceName); + PagedIterable list(String name, String resourceGroupName, String workspaceName); /** - * Gets services in specified workspace. + * List model versions. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param name Model name. + * @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 modelId The Model Id. - * @param modelName The Model name. - * @param tag The object tag. - * @param tags A set of tags with which to filter the returned services. 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 services. It is a comma separated string - * of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param runId runId for model associated with service. - * @param expand Set to True to include Model details. - * @param orderby The option to order the response. + * @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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return services in specified workspace. + * @return a paginated list of ModelVersion entities. */ - PagedIterable listByWorkspace( + PagedIterable list( + String name, String resourceGroupName, String workspaceName, String skip, - String modelId, - String modelName, - String tag, + String orderBy, + Integer top, + String version, + String description, + Integer offset, String tags, String properties, - String runId, - Boolean expand, - OrderString orderby, Context context); /** - * Get a Service by name. + * Delete version. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. */ - ServiceResource get(String resourceGroupName, String workspaceName, String serviceName); + void delete(String name, String version, String resourceGroupName, String workspaceName); /** - * Get a Service by name. + * Delete version. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. - * @param expand Set to True to include Model details. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. + * @return the response. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String serviceName, Boolean expand, Context context); + Response deleteWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); /** - * Delete a specific Service.. + * Get version. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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. */ - void delete(String resourceGroupName, String workspaceName, String serviceName); + ModelVersionResource get(String name, String version, String resourceGroupName, String workspaceName); /** - * Delete a specific Service.. + * Get version. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param name Container name. + * @param version Version identifier. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param serviceName Name of the Azure Machine Learning service. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 version. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String serviceName, Context context); + Response getWithResponse( + String name, String version, String resourceGroupName, String workspaceName, Context context); /** - * Get a Service by name. + * Get version. * * @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 Service by name. + * @return version. */ - ServiceResource getById(String id); + ModelVersionResource getById(String id); /** - * Get a Service by name. + * Get version. * * @param id the resource ID. - * @param expand Set to True to include Model details. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Service by name. + * @return version. */ - Response getByIdWithResponse(String id, Boolean expand, Context context); + Response getByIdWithResponse(String id, Context context); /** - * Delete a specific Service.. + * Delete version. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -149,7 +150,7 @@ Response deleteWithResponse( void deleteById(String id); /** - * Delete a specific Service.. + * Delete version. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -161,10 +162,10 @@ Response deleteWithResponse( Response deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new ServiceResource resource. + * Begins definition for a new ModelVersionResource resource. * * @param name resource name. - * @return the first stage of the new ServiceResource definition. + * @return the first stage of the new ModelVersionResource definition. */ - ServiceResource.DefinitionStages.Blank define(String name); + ModelVersionResource.DefinitionStages.Blank define(String name); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Mpi.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Mpi.java new file mode 100644 index 000000000000..135e59635ae3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Mpi.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** MPI distribution configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") +@JsonTypeName("Mpi") +@Fluent +public final class Mpi extends DistributionConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Mpi.class); + + /* + * Number of processes per MPI node. + */ + @JsonProperty(value = "processCountPerInstance") + private Integer processCountPerInstance; + + /** + * Get the processCountPerInstance property: Number of processes per MPI node. + * + * @return the processCountPerInstance value. + */ + public Integer processCountPerInstance() { + return this.processCountPerInstance; + } + + /** + * Set the processCountPerInstance property: Number of processes per MPI node. + * + * @param processCountPerInstance the processCountPerInstance value to set. + * @return the Mpi object itself. + */ + public Mpi withProcessCountPerInstance(Integer processCountPerInstance) { + this.processCountPerInstance = processCountPerInstance; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeStateCounts.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeStateCounts.java index 257b3e76fb3a..fd3fc9c9e237 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeStateCounts.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NodeStateCounts.java @@ -15,43 +15,46 @@ public final class NodeStateCounts { @JsonIgnore private final ClientLogger logger = new ClientLogger(NodeStateCounts.class); /* - * Number of compute nodes in idle state. + * Idle node count. Number of compute nodes in idle state. */ @JsonProperty(value = "idleNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer idleNodeCount; /* - * Number of compute nodes which are running jobs. + * Running node count. Number of compute nodes which are running jobs. */ @JsonProperty(value = "runningNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer runningNodeCount; /* - * Number of compute nodes which are being prepared. + * Preparing node count. Number of compute nodes which are being prepared. */ @JsonProperty(value = "preparingNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer preparingNodeCount; /* - * Number of compute nodes which are in unusable state. + * Unusable node count. Number of compute nodes which are in unusable + * state. */ @JsonProperty(value = "unusableNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer unusableNodeCount; /* - * Number of compute nodes which are leaving the amlCompute. + * Leaving node count. Number of compute nodes which are leaving the + * amlCompute. */ @JsonProperty(value = "leavingNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer leavingNodeCount; /* - * Number of compute nodes which are in preempted state. + * Preempted node count. Number of compute nodes which are in preempted + * state. */ @JsonProperty(value = "preemptedNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer preemptedNodeCount; /** - * 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. */ @@ -60,7 +63,7 @@ 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. */ @@ -69,7 +72,7 @@ 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. */ @@ -78,7 +81,7 @@ 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. */ @@ -87,7 +90,7 @@ 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. */ @@ -96,7 +99,7 @@ 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. */ diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NoneDatastoreCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NoneDatastoreCredentials.java new file mode 100644 index 000000000000..d60bb861292b --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NoneDatastoreCredentials.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Empty/none datastore credentials. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") +@JsonTypeName("None") +@Fluent +public final class NoneDatastoreCredentials extends DatastoreCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NoneDatastoreCredentials.class); + + /* + * Empty/none datastore secret. + */ + @JsonProperty(value = "secrets") + private NoneDatastoreSecrets secrets; + + /** + * Get the secrets property: Empty/none datastore secret. + * + * @return the secrets value. + */ + public NoneDatastoreSecrets secrets() { + return this.secrets; + } + + /** + * Set the secrets property: Empty/none datastore secret. + * + * @param secrets the secrets value to set. + * @return the NoneDatastoreCredentials object itself. + */ + public NoneDatastoreCredentials withSecrets(NoneDatastoreSecrets 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 (secrets() != null) { + secrets().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestKeys.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NoneDatastoreSecrets.java similarity index 56% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestKeys.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NoneDatastoreSecrets.java index 483be60416d9..4f1721c352a1 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/CreateServiceRequestKeys.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/NoneDatastoreSecrets.java @@ -6,26 +6,17 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; -/** The authentication keys. */ +/** Empty/none datastore secret. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") +@JsonTypeName("None") @Immutable -public final class CreateServiceRequestKeys extends AuthKeys { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CreateServiceRequestKeys.class); - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestKeys withPrimaryKey(String primaryKey) { - super.withPrimaryKey(primaryKey); - return this; - } - - /** {@inheritDoc} */ - @Override - public CreateServiceRequestKeys withSecondaryKey(String secondaryKey) { - super.withSecondaryKey(secondaryKey); - return this; - } +public final class NoneDatastoreSecrets extends DatastoreSecretsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NoneDatastoreSecrets.class); /** * Validates the instance. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Notebooks.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Notebooks.java deleted file mode 100644 index e3059bf7d7a7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Notebooks.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Notebooks. */ -public interface Notebooks { - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - NotebookResourceInfo prepare(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - NotebookResourceInfo prepare(String resourceGroupName, String workspaceName, Context context); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - ListNotebookKeysResult listKeys(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Objective.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Objective.java new file mode 100644 index 000000000000..1c1e5780daf8 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Objective.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Optimization objective. */ +@Fluent +public final class Objective { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Objective.class); + + /* + * Defines supported metric goals for hyperparameter tuning + */ + @JsonProperty(value = "goal", required = true) + private Goal goal; + + /* + * Name of the metric to optimize. + */ + @JsonProperty(value = "primaryMetric", required = true) + private String primaryMetric; + + /** + * Get the goal property: Defines supported metric goals for hyperparameter tuning. + * + * @return the goal value. + */ + public Goal goal() { + return this.goal; + } + + /** + * Set the goal property: Defines supported metric goals for hyperparameter tuning. + * + * @param goal the goal value to set. + * @return the Objective object itself. + */ + public Objective withGoal(Goal goal) { + this.goal = goal; + return this; + } + + /** + * Get the primaryMetric property: Name of the metric to optimize. + * + * @return the primaryMetric value. + */ + public String primaryMetric() { + return this.primaryMetric; + } + + /** + * Set the primaryMetric property: 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (goal() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property goal in model Objective")); + } + if (primaryMetric() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property primaryMetric in model Objective")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeployment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeployment.java new file mode 100644 index 000000000000..c512ffe41a23 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeployment.java @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; + +/** The OnlineDeployment model. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "endpointComputeType", + defaultImpl = OnlineDeployment.class) +@JsonTypeName("OnlineDeployment") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "K8S", value = K8SOnlineDeployment.class), + @JsonSubTypes.Type(name = "Managed", value = ManagedOnlineDeployment.class) +}) +@Fluent +public class OnlineDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineDeployment.class); + + /* + * If true, enables Application Insights logging. + */ + @JsonProperty(value = "appInsightsEnabled") + private Boolean appInsightsEnabled; + + /* + * Code configuration for the endpoint deployment. + */ + @JsonProperty(value = "codeConfiguration") + private CodeConfiguration codeConfiguration; + + /* + * Description of the endpoint deployment. + */ + @JsonProperty(value = "description") + private String description; + + /* + * ARM resource ID of the environment specification for the endpoint + * deployment. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * Environment variables configuration for the deployment. + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Deployment container liveness/readiness probe configuration. + */ + @JsonProperty(value = "livenessProbe") + private ProbeSettings livenessProbe; + + /* + * Reference to the model asset for the endpoint deployment. + */ + @JsonProperty(value = "model") + private AssetReferenceBase model; + + /* + * Property dictionary. Properties can be added, but not removed or + * altered. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Provisioning state for the endpoint deployment. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DeploymentProvisioningState provisioningState; + + /* + * Online deployment scoring requests configuration. + */ + @JsonProperty(value = "requestSettings") + private OnlineRequestSettings requestSettings; + + /* + * Online deployment scaling configuration. + */ + @JsonProperty(value = "scaleSettings") + private OnlineScaleSettings scaleSettings; + + /** + * Get the appInsightsEnabled property: If true, enables Application Insights logging. + * + * @return the appInsightsEnabled value. + */ + public Boolean appInsightsEnabled() { + return this.appInsightsEnabled; + } + + /** + * Set the appInsightsEnabled property: If true, enables Application Insights logging. + * + * @param appInsightsEnabled the appInsightsEnabled value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + this.appInsightsEnabled = appInsightsEnabled; + return this; + } + + /** + * Get the codeConfiguration property: Code configuration for the endpoint deployment. + * + * @return the codeConfiguration value. + */ + public CodeConfiguration codeConfiguration() { + return this.codeConfiguration; + } + + /** + * Set the codeConfiguration property: Code configuration for the endpoint deployment. + * + * @param codeConfiguration the codeConfiguration value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { + this.codeConfiguration = codeConfiguration; + return this; + } + + /** + * Get the description property: Description of the endpoint deployment. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the endpoint deployment. + * + * @param description the description value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the environmentId property: ARM resource ID of the environment specification for the endpoint deployment. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: ARM resource ID of the environment specification for the endpoint deployment. + * + * @param environmentId the environmentId value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the environmentVariables property: Environment variables configuration for the deployment. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment variables configuration for the deployment. + * + * @param environmentVariables the environmentVariables value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the livenessProbe property: Deployment container liveness/readiness probe configuration. + * + * @return the livenessProbe value. + */ + public ProbeSettings livenessProbe() { + return this.livenessProbe; + } + + /** + * Set the livenessProbe property: Deployment container liveness/readiness probe configuration. + * + * @param livenessProbe the livenessProbe value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { + this.livenessProbe = livenessProbe; + return this; + } + + /** + * Get the model property: Reference to the model asset for the endpoint deployment. + * + * @return the model value. + */ + public AssetReferenceBase model() { + return this.model; + } + + /** + * Set the model property: Reference to the model asset for the endpoint deployment. + * + * @param model the model value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withModel(AssetReferenceBase model) { + this.model = model; + return this; + } + + /** + * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. + * + * @return the properties value. + */ + public Map 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 OnlineDeployment object itself. + */ + public OnlineDeployment withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the endpoint deployment. + * + * @return the provisioningState value. + */ + public DeploymentProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the requestSettings property: Online deployment scoring requests configuration. + * + * @return the requestSettings value. + */ + public OnlineRequestSettings requestSettings() { + return this.requestSettings; + } + + /** + * Set the requestSettings property: Online deployment scoring requests configuration. + * + * @param requestSettings the requestSettings value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + this.requestSettings = requestSettings; + return this; + } + + /** + * Get the scaleSettings property: Online deployment scaling configuration. + * + * @return the scaleSettings value. + */ + public OnlineScaleSettings scaleSettings() { + return this.scaleSettings; + } + + /** + * Set the scaleSettings property: Online deployment scaling configuration. + * + * @param scaleSettings the scaleSettings value to set. + * @return the OnlineDeployment object itself. + */ + public OnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + this.scaleSettings = scaleSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (codeConfiguration() != null) { + codeConfiguration().validate(); + } + if (livenessProbe() != null) { + livenessProbe().validate(); + } + if (model() != null) { + model().validate(); + } + if (requestSettings() != null) { + requestSettings().validate(); + } + if (scaleSettings() != null) { + scaleSettings().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentTrackedResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentTrackedResource.java new file mode 100644 index 000000000000..c2588ca0acb2 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentTrackedResource.java @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner; +import java.util.Map; + +/** An immutable client-side representation of OnlineDeploymentTrackedResource. */ +public interface OnlineDeploymentTrackedResource { + /** + * 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 identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + ResourceIdentity 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 properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + OnlineDeployment properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner + * com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner object. + * + * @return the inner object. + */ + OnlineDeploymentTrackedResourceInner innerModel(); + + /** The entirety of the OnlineDeploymentTrackedResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The OnlineDeploymentTrackedResource definition stages. */ + interface DefinitionStages { + /** The first stage of the OnlineDeploymentTrackedResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the OnlineDeploymentTrackedResource 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 OnlineDeploymentTrackedResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies endpointName, resourceGroupName, workspaceName. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingOnlineEndpoint( + String endpointName, String resourceGroupName, String workspaceName); + } + /** The stage of the OnlineDeploymentTrackedResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(OnlineDeployment properties); + } + /** + * The stage of the OnlineDeploymentTrackedResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + OnlineDeploymentTrackedResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + OnlineDeploymentTrackedResource create(Context context); + } + /** The stage of the OnlineDeploymentTrackedResource 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 OnlineDeploymentTrackedResource definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Service identity associated with a resource.. + * + * @param identity Service identity associated with a resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ResourceIdentity identity); + } + /** The stage of the OnlineDeploymentTrackedResource 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); + } + } + /** + * Begins update for the OnlineDeploymentTrackedResource resource. + * + * @return the stage of resource update. + */ + OnlineDeploymentTrackedResource.Update update(); + + /** The template for OnlineDeploymentTrackedResource update. */ + interface Update + extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + OnlineDeploymentTrackedResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + OnlineDeploymentTrackedResource apply(Context context); + } + /** The OnlineDeploymentTrackedResource update stages. */ + interface UpdateStages { + /** The stage of the OnlineDeploymentTrackedResource 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 OnlineDeploymentTrackedResource update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Service identity associated with a resource.. + * + * @param identity Service identity associated with a resource. + * @return the next definition stage. + */ + Update withIdentity(ResourceIdentity identity); + } + /** The stage of the OnlineDeploymentTrackedResource 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 OnlineDeploymentTrackedResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(PartialOnlineDeployment properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + OnlineDeploymentTrackedResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + OnlineDeploymentTrackedResource refresh(Context context); + + /** + * Polls an Endpoint operation. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentLogs getLogs(DeploymentLogsRequest body); + + /** + * Polls an Endpoint operation. + * + * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response getLogsWithResponse(DeploymentLogsRequest body, Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java new file mode 100644 index 000000000000..f93c8375b474 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of OnlineDeployment entities. */ +@Fluent +public final class OnlineDeploymentTrackedResourceArmPaginatedResult { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(OnlineDeploymentTrackedResourceArmPaginatedResult.class); + + /* + * The link to the next page of OnlineDeployment objects. If null, there + * are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type OnlineDeployment. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of OnlineDeployment 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 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; + } + + /** + * Get the value property: An array of objects of type OnlineDeployment. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeployments.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeployments.java new file mode 100644 index 000000000000..e6acf10ad135 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeployments.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 OnlineDeployments. */ +public interface OnlineDeployments { + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint 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 OnlineDeployment entities. + */ + PagedIterable list( + String endpointName, String resourceGroupName, String workspaceName); + + /** + * List Inference Endpoint Deployments. + * + * @param endpointName Inference endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + */ + PagedIterable list( + String endpointName, + String resourceGroupName, + String workspaceName, + String orderBy, + Integer top, + String skip, + Context context); + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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. + */ + void delete(String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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. + */ + void delete( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 inference Deployment Deployment. + */ + OnlineDeploymentTrackedResource get( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName); + + /** + * Get Inference Deployment Deployment. + * + * @param endpointName Inference endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @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 inference Deployment Deployment. + */ + Response getWithResponse( + String endpointName, String deploymentName, String resourceGroupName, String workspaceName, Context context); + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DeploymentLogs getLogs( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body); + + /** + * Polls an Endpoint operation. + * + * @param endpointName Inference endpoint name. + * @param deploymentName The name and identifier for the endpoint. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response getLogsWithResponse( + String endpointName, + String deploymentName, + String resourceGroupName, + String workspaceName, + DeploymentLogsRequest body, + Context context); + + /** + * Get Inference Deployment Deployment. + * + * @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 inference Deployment Deployment. + */ + OnlineDeploymentTrackedResource getById(String id); + + /** + * Get Inference Deployment Deployment. + * + * @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 inference Deployment Deployment. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete Inference Endpoint Deployment (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 Inference Endpoint Deployment (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 OnlineDeploymentTrackedResource resource. + * + * @param name resource name. + * @return the first stage of the new OnlineDeploymentTrackedResource definition. + */ + OnlineDeploymentTrackedResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsCreateOrUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsCreateOrUpdateHeaders.java new file mode 100644 index 000000000000..3744adb65da1 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsCreateOrUpdateHeaders.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** The OnlineDeploymentsCreateOrUpdateHeaders model. */ +@Fluent +public final class OnlineDeploymentsCreateOrUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineDeploymentsCreateOrUpdateHeaders.class); + + /* + * The x-ms-async-operation-timeout property. + */ + @JsonProperty(value = "x-ms-async-operation-timeout") + private Duration xMsAsyncOperationTimeout; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @return the xMsAsyncOperationTimeout value. + */ + public Duration xMsAsyncOperationTimeout() { + return this.xMsAsyncOperationTimeout; + } + + /** + * Set the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @param xMsAsyncOperationTimeout the xMsAsyncOperationTimeout value to set. + * @return the OnlineDeploymentsCreateOrUpdateHeaders object itself. + */ + public OnlineDeploymentsCreateOrUpdateHeaders withXMsAsyncOperationTimeout(Duration xMsAsyncOperationTimeout) { + this.xMsAsyncOperationTimeout = xMsAsyncOperationTimeout; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the OnlineDeploymentsCreateOrUpdateHeaders object itself. + */ + public OnlineDeploymentsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsCreateOrUpdateResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsCreateOrUpdateResponse.java new file mode 100644 index 000000000000..8bdd0f7701f5 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsCreateOrUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class OnlineDeploymentsCreateOrUpdateResponse + extends ResponseBase { + /** + * Creates an instance of OnlineDeploymentsCreateOrUpdateResponse. + * + * @param request the request which resulted in this OnlineDeploymentsCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OnlineDeploymentsCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + OnlineDeploymentTrackedResourceInner value, + OnlineDeploymentsCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public OnlineDeploymentTrackedResourceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsDeleteHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsDeleteHeaders.java new file mode 100644 index 000000000000..d29687eb7695 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsDeleteHeaders.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** The OnlineDeploymentsDeleteHeaders model. */ +@Fluent +public final class OnlineDeploymentsDeleteHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineDeploymentsDeleteHeaders.class); + + /* + * The x-ms-async-operation-timeout property. + */ + @JsonProperty(value = "x-ms-async-operation-timeout") + private Duration xMsAsyncOperationTimeout; + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @return the xMsAsyncOperationTimeout value. + */ + public Duration xMsAsyncOperationTimeout() { + return this.xMsAsyncOperationTimeout; + } + + /** + * Set the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @param xMsAsyncOperationTimeout the xMsAsyncOperationTimeout value to set. + * @return the OnlineDeploymentsDeleteHeaders object itself. + */ + public OnlineDeploymentsDeleteHeaders withXMsAsyncOperationTimeout(Duration xMsAsyncOperationTimeout) { + this.xMsAsyncOperationTimeout = xMsAsyncOperationTimeout; + return this; + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the OnlineDeploymentsDeleteHeaders object itself. + */ + public OnlineDeploymentsDeleteHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OnlineDeploymentsDeleteHeaders object itself. + */ + public OnlineDeploymentsDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsDeleteResponse.java similarity index 68% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteResponse.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsDeleteResponse.java index b9eec18c7496..230c98674cf5 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/MachineLearningComputesDeleteResponse.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsDeleteResponse.java @@ -9,23 +9,22 @@ import com.azure.core.http.rest.ResponseBase; /** Contains all response data for the delete operation. */ -public final class MachineLearningComputesDeleteResponse - extends ResponseBase { +public final class OnlineDeploymentsDeleteResponse extends ResponseBase { /** - * Creates an instance of MachineLearningComputesDeleteResponse. + * Creates an instance of OnlineDeploymentsDeleteResponse. * - * @param request the request which resulted in this MachineLearningComputesDeleteResponse. + * @param request the request which resulted in this OnlineDeploymentsDeleteResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public MachineLearningComputesDeleteResponse( + public OnlineDeploymentsDeleteResponse( HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, - MachineLearningComputesDeleteHeaders headers) { + OnlineDeploymentsDeleteHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsUpdateHeaders.java new file mode 100644 index 000000000000..3ce7d98803c4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsUpdateHeaders.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** The OnlineDeploymentsUpdateHeaders model. */ +@Fluent +public final class OnlineDeploymentsUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineDeploymentsUpdateHeaders.class); + + /* + * The x-ms-async-operation-timeout property. + */ + @JsonProperty(value = "x-ms-async-operation-timeout") + private Duration xMsAsyncOperationTimeout; + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @return the xMsAsyncOperationTimeout value. + */ + public Duration xMsAsyncOperationTimeout() { + return this.xMsAsyncOperationTimeout; + } + + /** + * Set the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @param xMsAsyncOperationTimeout the xMsAsyncOperationTimeout value to set. + * @return the OnlineDeploymentsUpdateHeaders object itself. + */ + public OnlineDeploymentsUpdateHeaders withXMsAsyncOperationTimeout(Duration xMsAsyncOperationTimeout) { + this.xMsAsyncOperationTimeout = xMsAsyncOperationTimeout; + return this; + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the OnlineDeploymentsUpdateHeaders object itself. + */ + public OnlineDeploymentsUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OnlineDeploymentsUpdateHeaders object itself. + */ + public OnlineDeploymentsUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsUpdateResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsUpdateResponse.java new file mode 100644 index 000000000000..8543e94ca472 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineDeploymentsUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineDeploymentTrackedResourceInner; + +/** Contains all response data for the update operation. */ +public final class OnlineDeploymentsUpdateResponse + extends ResponseBase { + /** + * Creates an instance of OnlineDeploymentsUpdateResponse. + * + * @param request the request which resulted in this OnlineDeploymentsUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OnlineDeploymentsUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + OnlineDeploymentTrackedResourceInner value, + OnlineDeploymentsUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public OnlineDeploymentTrackedResourceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpoint.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpoint.java new file mode 100644 index 000000000000..c20cf5d35cde --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpoint.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointInner; +import java.util.Map; + +/** An immutable client-side representation of OnlineEndpoint. */ +public interface OnlineEndpoint { + /** + * Gets the authMode property: Inference endpoint authentication mode type. + * + * @return the authMode value. + */ + EndpointAuthMode authMode(); + + /** + * Gets the description property: Description of the inference endpoint. + * + * @return the description value. + */ + 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. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the provisioningState property: State of endpoint provisioning. + * + * @return the provisioningState value. + */ + EndpointProvisioningState provisioningState(); + + /** + * Gets the scoringUri property: Endpoint URI. + * + * @return the scoringUri value. + */ + String scoringUri(); + + /** + * Gets the swaggerUri property: Endpoint Swagger URI. + * + * @return the swaggerUri value. + */ + String swaggerUri(); + + /** + * Gets the target property: ARM resource ID of the compute if it exists. optional. + * + * @return the target value. + */ + String target(); + + /** + * Gets the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @return the traffic value. + */ + Map traffic(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointInner object. + * + * @return the inner object. + */ + OnlineEndpointInner innerModel(); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointTrackedResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointTrackedResource.java new file mode 100644 index 000000000000..87784745d296 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointTrackedResource.java @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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.machinelearningservices.fluent.models.OnlineEndpointInner; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner; +import java.util.Map; + +/** An immutable client-side representation of OnlineEndpointTrackedResource. */ +public interface OnlineEndpointTrackedResource { + /** + * 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 identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + ResourceIdentity 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 properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + OnlineEndpoint properties(); + + /** + * Gets the systemData property: System data associated with resource provider. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner + * object. + * + * @return the inner object. + */ + OnlineEndpointTrackedResourceInner innerModel(); + + /** The entirety of the OnlineEndpointTrackedResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, + DefinitionStages.WithCreate { + } + /** The OnlineEndpointTrackedResource definition stages. */ + interface DefinitionStages { + /** The first stage of the OnlineEndpointTrackedResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the OnlineEndpointTrackedResource 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 OnlineEndpointTrackedResource 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 Name of Azure Machine Learning workspace. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + /** The stage of the OnlineEndpointTrackedResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(OnlineEndpointInner properties); + } + /** + * The stage of the OnlineEndpointTrackedResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + OnlineEndpointTrackedResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + OnlineEndpointTrackedResource create(Context context); + } + /** The stage of the OnlineEndpointTrackedResource 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 OnlineEndpointTrackedResource definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Service identity associated with a resource.. + * + * @param identity Service identity associated with a resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ResourceIdentity identity); + } + /** The stage of the OnlineEndpointTrackedResource 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); + } + } + /** + * Begins update for the OnlineEndpointTrackedResource resource. + * + * @return the stage of resource update. + */ + OnlineEndpointTrackedResource.Update update(); + + /** The template for OnlineEndpointTrackedResource update. */ + interface Update + extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + OnlineEndpointTrackedResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + OnlineEndpointTrackedResource apply(Context context); + } + /** The OnlineEndpointTrackedResource update stages. */ + interface UpdateStages { + /** The stage of the OnlineEndpointTrackedResource 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 OnlineEndpointTrackedResource update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Service identity associated with a resource.. + * + * @param identity Service identity associated with a resource. + * @return the next definition stage. + */ + Update withIdentity(ResourceIdentity identity); + } + /** The stage of the OnlineEndpointTrackedResource 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 OnlineEndpointTrackedResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(PartialOnlineEndpoint properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + OnlineEndpointTrackedResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + OnlineEndpointTrackedResource refresh(Context context); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @throws com.azure.core.management.exception.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. + */ + EndpointAuthKeys listKeys(); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + Response listKeysWithResponse(Context context); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 regenerateKeys(RegenerateEndpointKeysRequest body); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param body RegenerateKeys 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. + */ + void regenerateKeys(RegenerateEndpointKeysRequest body, Context context); + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @throws com.azure.core.management.exception.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. + */ + EndpointAuthToken getToken(); + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + Response getTokenWithResponse(Context context); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointTrackedResourceArmPaginatedResult.java new file mode 100644 index 000000000000..4757aadfbb2a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointTrackedResourceArmPaginatedResult.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A paginated list of OnlineEndpoint entities. */ +@Fluent +public final class OnlineEndpointTrackedResourceArmPaginatedResult { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(OnlineEndpointTrackedResourceArmPaginatedResult.class); + + /* + * The link to the next page of OnlineEndpoint objects. If null, there are + * no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type OnlineEndpoint. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link to the next page of OnlineEndpoint 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 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; + } + + /** + * Get the value property: An array of objects of type OnlineEndpoint. + * + * @return the value value. + */ + public List value() { + return this.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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpoints.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpoints.java new file mode 100644 index 000000000000..cfefda80f6c1 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpoints.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.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 OnlineEndpoints. */ +public interface OnlineEndpoints { + /** + * 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. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * 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 com.azure.core.management.exception.ManagementException thrown if the 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. + */ + PagedIterable list( + String resourceGroupName, + String workspaceName, + String name, + Integer count, + EndpointComputeType computeType, + String skip, + String tags, + String properties, + OrderString orderBy, + Context context); + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint 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. + */ + void delete(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Delete Online Endpoint (asynchronous). + * + * @param endpointName Online Endpoint name. + * @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. + */ + void delete(String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint 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 online Endpoint. + */ + OnlineEndpointTrackedResource get(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Get Online Endpoint. + * + * @param endpointName Online Endpoint name. + * @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 online Endpoint. + */ + Response getWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint 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 keys for endpoint authentication. + */ + EndpointAuthKeys listKeys(String endpointName, String resourceGroupName, String workspaceName); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param endpointName Online Endpoint name. + * @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 keys for endpoint authentication. + */ + Response listKeysWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 regenerateKeys( + String endpointName, String resourceGroupName, String workspaceName, RegenerateEndpointKeysRequest body); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param endpointName Online Endpoint name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param body RegenerateKeys 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. + */ + void regenerateKeys( + String endpointName, + String resourceGroupName, + String workspaceName, + RegenerateEndpointKeysRequest body, + Context context); + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint 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 service Token. + */ + EndpointAuthToken getToken(String endpointName, String resourceGroupName, String workspaceName); + + /** + * Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + * + * @param endpointName Online Endpoint name. + * @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 service Token. + */ + Response getTokenWithResponse( + String endpointName, String resourceGroupName, String workspaceName, Context context); + + /** + * Get Online Endpoint. + * + * @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 online Endpoint. + */ + OnlineEndpointTrackedResource getById(String id); + + /** + * Get Online Endpoint. + * + * @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 online Endpoint. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete Online Endpoint (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 Online Endpoint (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 OnlineEndpointTrackedResource resource. + * + * @param name resource name. + * @return the first stage of the new OnlineEndpointTrackedResource definition. + */ + OnlineEndpointTrackedResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsCreateOrUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsCreateOrUpdateHeaders.java new file mode 100644 index 000000000000..ce1e6dccc157 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsCreateOrUpdateHeaders.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** The OnlineEndpointsCreateOrUpdateHeaders model. */ +@Fluent +public final class OnlineEndpointsCreateOrUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineEndpointsCreateOrUpdateHeaders.class); + + /* + * The x-ms-async-operation-timeout property. + */ + @JsonProperty(value = "x-ms-async-operation-timeout") + private Duration xMsAsyncOperationTimeout; + + /* + * The Azure-AsyncOperation property. + */ + @JsonProperty(value = "Azure-AsyncOperation") + private String azureAsyncOperation; + + /** + * Get the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @return the xMsAsyncOperationTimeout value. + */ + public Duration xMsAsyncOperationTimeout() { + return this.xMsAsyncOperationTimeout; + } + + /** + * Set the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @param xMsAsyncOperationTimeout the xMsAsyncOperationTimeout value to set. + * @return the OnlineEndpointsCreateOrUpdateHeaders object itself. + */ + public OnlineEndpointsCreateOrUpdateHeaders withXMsAsyncOperationTimeout(Duration xMsAsyncOperationTimeout) { + this.xMsAsyncOperationTimeout = xMsAsyncOperationTimeout; + return this; + } + + /** + * Get the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @return the azureAsyncOperation value. + */ + public String azureAsyncOperation() { + return this.azureAsyncOperation; + } + + /** + * Set the azureAsyncOperation property: The Azure-AsyncOperation property. + * + * @param azureAsyncOperation the azureAsyncOperation value to set. + * @return the OnlineEndpointsCreateOrUpdateHeaders object itself. + */ + public OnlineEndpointsCreateOrUpdateHeaders withAzureAsyncOperation(String azureAsyncOperation) { + this.azureAsyncOperation = azureAsyncOperation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsCreateOrUpdateResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsCreateOrUpdateResponse.java new file mode 100644 index 000000000000..c20306ab6ec7 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsCreateOrUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner; + +/** Contains all response data for the createOrUpdate operation. */ +public final class OnlineEndpointsCreateOrUpdateResponse + extends ResponseBase { + /** + * Creates an instance of OnlineEndpointsCreateOrUpdateResponse. + * + * @param request the request which resulted in this OnlineEndpointsCreateOrUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OnlineEndpointsCreateOrUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + OnlineEndpointTrackedResourceInner value, + OnlineEndpointsCreateOrUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public OnlineEndpointTrackedResourceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsDeleteHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsDeleteHeaders.java new file mode 100644 index 000000000000..8b9a4c8a850a --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsDeleteHeaders.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** The OnlineEndpointsDeleteHeaders model. */ +@Fluent +public final class OnlineEndpointsDeleteHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineEndpointsDeleteHeaders.class); + + /* + * The x-ms-async-operation-timeout property. + */ + @JsonProperty(value = "x-ms-async-operation-timeout") + private Duration xMsAsyncOperationTimeout; + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @return the xMsAsyncOperationTimeout value. + */ + public Duration xMsAsyncOperationTimeout() { + return this.xMsAsyncOperationTimeout; + } + + /** + * Set the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @param xMsAsyncOperationTimeout the xMsAsyncOperationTimeout value to set. + * @return the OnlineEndpointsDeleteHeaders object itself. + */ + public OnlineEndpointsDeleteHeaders withXMsAsyncOperationTimeout(Duration xMsAsyncOperationTimeout) { + this.xMsAsyncOperationTimeout = xMsAsyncOperationTimeout; + return this; + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the OnlineEndpointsDeleteHeaders object itself. + */ + public OnlineEndpointsDeleteHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OnlineEndpointsDeleteHeaders object itself. + */ + public OnlineEndpointsDeleteHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsDeleteResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsDeleteResponse.java new file mode 100644 index 000000000000..fa1fc71601c5 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsDeleteResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class OnlineEndpointsDeleteResponse extends ResponseBase { + /** + * Creates an instance of OnlineEndpointsDeleteResponse. + * + * @param request the request which resulted in this OnlineEndpointsDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OnlineEndpointsDeleteResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, OnlineEndpointsDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsRegenerateKeysHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsRegenerateKeysHeaders.java new file mode 100644 index 000000000000..8b213b958770 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsRegenerateKeysHeaders.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OnlineEndpointsRegenerateKeysHeaders model. */ +@Fluent +public final class OnlineEndpointsRegenerateKeysHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineEndpointsRegenerateKeysHeaders.class); + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the OnlineEndpointsRegenerateKeysHeaders object itself. + */ + public OnlineEndpointsRegenerateKeysHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OnlineEndpointsRegenerateKeysHeaders object itself. + */ + public OnlineEndpointsRegenerateKeysHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsRegenerateKeysResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsRegenerateKeysResponse.java new file mode 100644 index 000000000000..5d1db8ced6ed --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsRegenerateKeysResponse.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the regenerateKeys operation. */ +public final class OnlineEndpointsRegenerateKeysResponse + extends ResponseBase { + /** + * Creates an instance of OnlineEndpointsRegenerateKeysResponse. + * + * @param request the request which resulted in this OnlineEndpointsRegenerateKeysResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OnlineEndpointsRegenerateKeysResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + OnlineEndpointsRegenerateKeysHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsUpdateHeaders.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsUpdateHeaders.java new file mode 100644 index 000000000000..2503439090ee --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsUpdateHeaders.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** The OnlineEndpointsUpdateHeaders model. */ +@Fluent +public final class OnlineEndpointsUpdateHeaders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineEndpointsUpdateHeaders.class); + + /* + * The x-ms-async-operation-timeout property. + */ + @JsonProperty(value = "x-ms-async-operation-timeout") + private Duration xMsAsyncOperationTimeout; + + /* + * The Retry-After property. + */ + @JsonProperty(value = "Retry-After") + private Integer retryAfter; + + /* + * The Location property. + */ + @JsonProperty(value = "Location") + private String location; + + /** + * Get the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @return the xMsAsyncOperationTimeout value. + */ + public Duration xMsAsyncOperationTimeout() { + return this.xMsAsyncOperationTimeout; + } + + /** + * Set the xMsAsyncOperationTimeout property: The x-ms-async-operation-timeout property. + * + * @param xMsAsyncOperationTimeout the xMsAsyncOperationTimeout value to set. + * @return the OnlineEndpointsUpdateHeaders object itself. + */ + public OnlineEndpointsUpdateHeaders withXMsAsyncOperationTimeout(Duration xMsAsyncOperationTimeout) { + this.xMsAsyncOperationTimeout = xMsAsyncOperationTimeout; + return this; + } + + /** + * Get the retryAfter property: The Retry-After property. + * + * @return the retryAfter value. + */ + public Integer retryAfter() { + return this.retryAfter; + } + + /** + * Set the retryAfter property: The Retry-After property. + * + * @param retryAfter the retryAfter value to set. + * @return the OnlineEndpointsUpdateHeaders object itself. + */ + public OnlineEndpointsUpdateHeaders withRetryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * Get the location property: The Location property. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The Location property. + * + * @param location the location value to set. + * @return the OnlineEndpointsUpdateHeaders object itself. + */ + public OnlineEndpointsUpdateHeaders withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsUpdateResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsUpdateResponse.java new file mode 100644 index 000000000000..a65e1a1de65e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineEndpointsUpdateResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import com.azure.resourcemanager.machinelearningservices.fluent.models.OnlineEndpointTrackedResourceInner; + +/** Contains all response data for the update operation. */ +public final class OnlineEndpointsUpdateResponse + extends ResponseBase { + /** + * Creates an instance of OnlineEndpointsUpdateResponse. + * + * @param request the request which resulted in this OnlineEndpointsUpdateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public OnlineEndpointsUpdateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + OnlineEndpointTrackedResourceInner value, + OnlineEndpointsUpdateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public OnlineEndpointTrackedResourceInner getValue() { + return super.getValue(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineRequestSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineRequestSettings.java new file mode 100644 index 000000000000..34c55cc959cd --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineRequestSettings.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** Online deployment scoring requests configuration. */ +@Fluent +public final class OnlineRequestSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineRequestSettings.class); + + /* + * The number of requests allowed to queue at once for this deployment. + */ + @JsonProperty(value = "maxConcurrentRequestsPerInstance") + private Integer maxConcurrentRequestsPerInstance; + + /* + * The maximum queue wait time in ISO 8601 format. Supports millisecond + * precision. + */ + @JsonProperty(value = "maxQueueWait") + private Duration maxQueueWait; + + /* + * The request timeout in ISO 8601 format. Supports millisecond precision. + */ + @JsonProperty(value = "requestTimeout") + private Duration requestTimeout; + + /** + * Get the maxConcurrentRequestsPerInstance property: The number of requests allowed to queue at once for this + * deployment. + * + * @return the maxConcurrentRequestsPerInstance value. + */ + public Integer maxConcurrentRequestsPerInstance() { + return this.maxConcurrentRequestsPerInstance; + } + + /** + * Set the maxConcurrentRequestsPerInstance property: The number of requests allowed to queue at once for this + * deployment. + * + * @param maxConcurrentRequestsPerInstance the maxConcurrentRequestsPerInstance value to set. + * @return the OnlineRequestSettings object itself. + */ + public OnlineRequestSettings withMaxConcurrentRequestsPerInstance(Integer maxConcurrentRequestsPerInstance) { + this.maxConcurrentRequestsPerInstance = maxConcurrentRequestsPerInstance; + return this; + } + + /** + * Get the maxQueueWait property: The maximum queue wait time in ISO 8601 format. Supports millisecond precision. + * + * @return the maxQueueWait value. + */ + public Duration maxQueueWait() { + return this.maxQueueWait; + } + + /** + * Set the maxQueueWait property: The maximum queue wait time in ISO 8601 format. Supports millisecond precision. + * + * @param maxQueueWait the maxQueueWait value to set. + * @return the OnlineRequestSettings object itself. + */ + public OnlineRequestSettings withMaxQueueWait(Duration maxQueueWait) { + this.maxQueueWait = maxQueueWait; + return this; + } + + /** + * Get the requestTimeout property: The request timeout in ISO 8601 format. Supports millisecond precision. + * + * @return the requestTimeout value. + */ + public Duration requestTimeout() { + return this.requestTimeout; + } + + /** + * Set the requestTimeout property: The request timeout in ISO 8601 format. Supports millisecond precision. + * + * @param requestTimeout the requestTimeout value to set. + * @return the OnlineRequestSettings object itself. + */ + public OnlineRequestSettings withRequestTimeout(Duration requestTimeout) { + this.requestTimeout = requestTimeout; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineScaleSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineScaleSettings.java new file mode 100644 index 000000000000..11ff76a393bf --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OnlineScaleSettings.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Online deployment scaling configuration. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "scaleType", + defaultImpl = OnlineScaleSettings.class) +@JsonTypeName("OnlineScaleSettings") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Auto", value = AutoScaleSettings.class), + @JsonSubTypes.Type(name = "Manual", value = ManualScaleSettings.class) +}) +@Fluent +public class OnlineScaleSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OnlineScaleSettings.class); + + /* + * Maximum number of instances for this deployment. + */ + @JsonProperty(value = "maxInstances") + private Integer maxInstances; + + /* + * Minimum number of instances for this deployment. + */ + @JsonProperty(value = "minInstances") + private Integer minInstances; + + /** + * Get the maxInstances property: Maximum number of instances for this deployment. + * + * @return the maxInstances value. + */ + public Integer maxInstances() { + return this.maxInstances; + } + + /** + * Set the maxInstances property: Maximum number of instances for this deployment. + * + * @param maxInstances the maxInstances value to set. + * @return the OnlineScaleSettings object itself. + */ + public OnlineScaleSettings withMaxInstances(Integer maxInstances) { + this.maxInstances = maxInstances; + return this; + } + + /** + * Get the minInstances property: Minimum number of instances for this deployment. + * + * @return the minInstances value. + */ + public Integer minInstances() { + return this.minInstances; + } + + /** + * Set the minInstances property: Minimum number of instances for this deployment. + * + * @param minInstances the minInstances value to set. + * @return the OnlineScaleSettings object itself. + */ + public OnlineScaleSettings withMinInstances(Integer minInstances) { + this.minInstances = minInstances; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperatingSystemType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperatingSystemType.java new file mode 100644 index 000000000000..d2ba8be9b809 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OperatingSystemType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OperatingSystemType. */ +public final class OperatingSystemType extends ExpandableStringEnum { + /** Static value Linux for OperatingSystemType. */ + public static final OperatingSystemType LINUX = fromString("Linux"); + + /** Static value Windows for OperatingSystemType. */ + public static final OperatingSystemType WINDOWS = fromString("Windows"); + + /** + * Creates or finds a OperatingSystemType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperatingSystemType. + */ + @JsonCreator + public static OperatingSystemType fromString(String name) { + return fromString(name, OperatingSystemType.class); + } + + /** @return known OperatingSystemType values. */ + public static Collection values() { + return values(OperatingSystemType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OriginType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OriginType.java new file mode 100644 index 000000000000..309972a2b19e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OriginType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OriginType. */ +public final class OriginType extends ExpandableStringEnum { + /** Static value Synapse for OriginType. */ + public static final OriginType SYNAPSE = fromString("Synapse"); + + /** + * Creates or finds a OriginType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OriginType. + */ + @JsonCreator + public static OriginType fromString(String name) { + return fromString(name, OriginType.class); + } + + /** @return known OriginType values. */ + public static Collection values() { + return values(OriginType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OutputDataBinding.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OutputDataBinding.java new file mode 100644 index 000000000000..6b5d72c642b3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OutputDataBinding.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The OutputDataBinding model. */ +@Fluent +public final class OutputDataBinding { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OutputDataBinding.class); + + /* + * ARM resource ID of the datastore where the data output will be stored. + */ + @JsonProperty(value = "datastoreId") + private String datastoreId; + + /* + * Mechanism for data movement to datastore. + */ + @JsonProperty(value = "mode") + private DataBindingMode mode; + + /* + * Location of data inside the container process. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + + /* + * Path within the datastore to the data. + */ + @JsonProperty(value = "pathOnDatastore") + private String pathOnDatastore; + + /** + * Get the datastoreId property: ARM resource ID of the datastore where the data output will be stored. + * + * @return the datastoreId value. + */ + public String datastoreId() { + return this.datastoreId; + } + + /** + * Set the datastoreId property: ARM resource ID of the datastore where the data output will be stored. + * + * @param datastoreId the datastoreId value to set. + * @return the OutputDataBinding object itself. + */ + public OutputDataBinding withDatastoreId(String datastoreId) { + this.datastoreId = datastoreId; + return this; + } + + /** + * Get the mode property: Mechanism for data movement to datastore. + * + * @return the mode value. + */ + public DataBindingMode mode() { + return this.mode; + } + + /** + * Set the mode property: Mechanism for data movement to datastore. + * + * @param mode the mode value to set. + * @return the OutputDataBinding object itself. + */ + public OutputDataBinding withMode(DataBindingMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the pathOnCompute property: Location of data inside the container process. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Location of data inside the container process. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the OutputDataBinding object itself. + */ + public OutputDataBinding withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + + /** + * Get the pathOnDatastore property: Path within the datastore to the data. + * + * @return the pathOnDatastore value. + */ + public String pathOnDatastore() { + return this.pathOnDatastore; + } + + /** + * Set the pathOnDatastore property: Path within the datastore to the data. + * + * @param pathOnDatastore the pathOnDatastore value to set. + * @return the OutputDataBinding object itself. + */ + public OutputDataBinding withPathOnDatastore(String pathOnDatastore) { + this.pathOnDatastore = pathOnDatastore; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OutputPathAssetReference.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OutputPathAssetReference.java new file mode 100644 index 000000000000..ae400e5c0c40 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/OutputPathAssetReference.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Reference to an asset via its path in a job output. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") +@JsonTypeName("OutputPath") +@Fluent +public final class OutputPathAssetReference extends AssetReferenceBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OutputPathAssetReference.class); + + /* + * ARM resource ID of the job. + */ + @JsonProperty(value = "jobId") + private String jobId; + + /* + * The path of the file/directory in the job output. + */ + @JsonProperty(value = "path") + private String path; + + /** + * Get the jobId property: ARM resource ID of the job. + * + * @return the jobId value. + */ + public String jobId() { + return this.jobId; + } + + /** + * Set the jobId property: ARM resource ID of the job. + * + * @param jobId the jobId value to set. + * @return the OutputPathAssetReference object itself. + */ + public OutputPathAssetReference withJobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedServiceList.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedServiceList.java deleted file mode 100644 index 526312035bc0..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PaginatedServiceList.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.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Paginated list of Machine Learning service objects wrapped in ARM resource envelope. */ -@Immutable -public final class PaginatedServiceList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PaginatedServiceList.class); - - /* - * An array of Machine Learning compute objects wrapped in ARM resource - * envelope. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * A continuation link (absolute URI) to the next page of results in the - * list. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @return the nextLink value. - */ - 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()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialAksOnlineDeployment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialAksOnlineDeployment.java new file mode 100644 index 000000000000..bf7abed762e1 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialAksOnlineDeployment.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The PartialAksOnlineDeployment model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") +@JsonTypeName("K8S") +@Fluent +public final class PartialAksOnlineDeployment extends PartialOnlineDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PartialAksOnlineDeployment.class); + + /* + * Resource requirements for each container instance within an online + * deployment. + */ + @JsonProperty(value = "containerResourceRequirements") + private ContainerResourceRequirements containerResourceRequirements; + + /** + * Get the containerResourceRequirements property: Resource requirements for each container instance within an + * online deployment. + * + * @return the containerResourceRequirements value. + */ + public ContainerResourceRequirements containerResourceRequirements() { + return this.containerResourceRequirements; + } + + /** + * Set the containerResourceRequirements property: Resource requirements for each container instance within an + * online deployment. + * + * @param containerResourceRequirements the containerResourceRequirements value to set. + * @return the PartialAksOnlineDeployment object itself. + */ + public PartialAksOnlineDeployment withContainerResourceRequirements( + ContainerResourceRequirements containerResourceRequirements) { + this.containerResourceRequirements = containerResourceRequirements; + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialAksOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + super.withAppInsightsEnabled(appInsightsEnabled); + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialAksOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { + super.withLivenessProbe(livenessProbe); + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialAksOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + super.withRequestSettings(requestSettings); + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialAksOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + super.withScaleSettings(scaleSettings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (containerResourceRequirements() != null) { + containerResourceRequirements().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchDeployment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchDeployment.java new file mode 100644 index 000000000000..11ffab0ba1a4 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchDeployment.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Mutable batch inference settings per deployment. */ +@Fluent +public final class PartialBatchDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PartialBatchDeployment.class); + + /* + * Description of the endpoint deployment. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the description property: Description of the endpoint deployment. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the endpoint deployment. + * + * @param description the description value to set. + * @return the PartialBatchDeployment object itself. + */ + public PartialBatchDeployment withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchDeploymentPartialTrackedResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchDeploymentPartialTrackedResource.java new file mode 100644 index 000000000000..d7d0857fec4f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchDeploymentPartialTrackedResource.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public final class PartialBatchDeploymentPartialTrackedResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(PartialBatchDeploymentPartialTrackedResource.class); + + /* + * Service identity associated with a resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * The geo-location where the resource lives. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties") + private PartialBatchDeployment properties; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Service identity associated with a resource. + * + * @param identity the identity value to set. + * @return the PartialBatchDeploymentPartialTrackedResource object itself. + */ + public PartialBatchDeploymentPartialTrackedResource withIdentity(ResourceIdentity 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 PartialBatchDeploymentPartialTrackedResource object itself. + */ + public PartialBatchDeploymentPartialTrackedResource withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the PartialBatchDeploymentPartialTrackedResource object itself. + */ + public PartialBatchDeploymentPartialTrackedResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public PartialBatchDeployment properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the PartialBatchDeploymentPartialTrackedResource object itself. + */ + public PartialBatchDeploymentPartialTrackedResource withProperties(PartialBatchDeployment properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PartialBatchDeploymentPartialTrackedResource object itself. + */ + public PartialBatchDeploymentPartialTrackedResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchEndpoint.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchEndpoint.java new file mode 100644 index 000000000000..d29a6ceedf75 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchEndpoint.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Mutable Batch endpoint configuration. */ +@Fluent +public final class PartialBatchEndpoint { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PartialBatchEndpoint.class); + + /* + * Traffic rules on how the traffic will be routed across deployments. + */ + @JsonProperty(value = "traffic") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map traffic; + + /** + * Get the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @return the traffic value. + */ + public Map traffic() { + return this.traffic; + } + + /** + * Set the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @param traffic the traffic value to set. + * @return the PartialBatchEndpoint object itself. + */ + public PartialBatchEndpoint withTraffic(Map traffic) { + this.traffic = traffic; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchEndpointPartialTrackedResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchEndpointPartialTrackedResource.java new file mode 100644 index 000000000000..725b04d40647 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialBatchEndpointPartialTrackedResource.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public final class PartialBatchEndpointPartialTrackedResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PartialBatchEndpointPartialTrackedResource.class); + + /* + * Service identity associated with a resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * The geo-location where the resource lives. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties") + private PartialBatchEndpoint properties; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Service identity associated with a resource. + * + * @param identity the identity value to set. + * @return the PartialBatchEndpointPartialTrackedResource object itself. + */ + public PartialBatchEndpointPartialTrackedResource withIdentity(ResourceIdentity 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 PartialBatchEndpointPartialTrackedResource object itself. + */ + public PartialBatchEndpointPartialTrackedResource withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the PartialBatchEndpointPartialTrackedResource object itself. + */ + public PartialBatchEndpointPartialTrackedResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public PartialBatchEndpoint properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the PartialBatchEndpointPartialTrackedResource object itself. + */ + public PartialBatchEndpointPartialTrackedResource withProperties(PartialBatchEndpoint properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PartialBatchEndpointPartialTrackedResource object itself. + */ + public PartialBatchEndpointPartialTrackedResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialManagedOnlineDeployment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialManagedOnlineDeployment.java new file mode 100644 index 000000000000..04b103b7f24b --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialManagedOnlineDeployment.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** The PartialManagedOnlineDeployment model. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") +@JsonTypeName("Managed") +@Fluent +public final class PartialManagedOnlineDeployment extends PartialOnlineDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PartialManagedOnlineDeployment.class); + + /* + * Deployment container liveness/readiness probe configuration. + */ + @JsonProperty(value = "readinessProbe") + private ProbeSettings readinessProbe; + + /** + * Get the readinessProbe property: Deployment container liveness/readiness probe configuration. + * + * @return the readinessProbe value. + */ + public ProbeSettings readinessProbe() { + return this.readinessProbe; + } + + /** + * Set the readinessProbe property: Deployment container liveness/readiness probe configuration. + * + * @param readinessProbe the readinessProbe value to set. + * @return the PartialManagedOnlineDeployment object itself. + */ + public PartialManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { + this.readinessProbe = readinessProbe; + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + super.withAppInsightsEnabled(appInsightsEnabled); + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialManagedOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { + super.withLivenessProbe(livenessProbe); + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + super.withRequestSettings(requestSettings); + return this; + } + + /** {@inheritDoc} */ + @Override + public PartialManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + super.withScaleSettings(scaleSettings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (readinessProbe() != null) { + readinessProbe().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineDeployment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineDeployment.java new file mode 100644 index 000000000000..e405e40ee24b --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineDeployment.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Mutable online deployment configuration. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "endpointComputeType", + defaultImpl = PartialOnlineDeployment.class) +@JsonTypeName("PartialOnlineDeployment") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "K8S", value = PartialAksOnlineDeployment.class), + @JsonSubTypes.Type(name = "Managed", value = PartialManagedOnlineDeployment.class) +}) +@Fluent +public class PartialOnlineDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PartialOnlineDeployment.class); + + /* + * Whether AppInsights telemetry is enabled for this online deployment. + */ + @JsonProperty(value = "appInsightsEnabled") + private Boolean appInsightsEnabled; + + /* + * Deployment container liveness/readiness probe configuration. + */ + @JsonProperty(value = "livenessProbe") + private ProbeSettings livenessProbe; + + /* + * Online deployment scoring requests configuration. + */ + @JsonProperty(value = "requestSettings") + private OnlineRequestSettings requestSettings; + + /* + * Online deployment scaling configuration. + */ + @JsonProperty(value = "scaleSettings") + private OnlineScaleSettings scaleSettings; + + /** + * Get the appInsightsEnabled property: Whether AppInsights telemetry is enabled for this online deployment. + * + * @return the appInsightsEnabled value. + */ + public Boolean appInsightsEnabled() { + return this.appInsightsEnabled; + } + + /** + * Set the appInsightsEnabled property: Whether AppInsights telemetry is enabled for this online deployment. + * + * @param appInsightsEnabled the appInsightsEnabled value to set. + * @return the PartialOnlineDeployment object itself. + */ + public PartialOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + this.appInsightsEnabled = appInsightsEnabled; + return this; + } + + /** + * Get the livenessProbe property: Deployment container liveness/readiness probe configuration. + * + * @return the livenessProbe value. + */ + public ProbeSettings livenessProbe() { + return this.livenessProbe; + } + + /** + * Set the livenessProbe property: Deployment container liveness/readiness probe configuration. + * + * @param livenessProbe the livenessProbe value to set. + * @return the PartialOnlineDeployment object itself. + */ + public PartialOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { + this.livenessProbe = livenessProbe; + return this; + } + + /** + * Get the requestSettings property: Online deployment scoring requests configuration. + * + * @return the requestSettings value. + */ + public OnlineRequestSettings requestSettings() { + return this.requestSettings; + } + + /** + * Set the requestSettings property: Online deployment scoring requests configuration. + * + * @param requestSettings the requestSettings value to set. + * @return the PartialOnlineDeployment object itself. + */ + public PartialOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + this.requestSettings = requestSettings; + return this; + } + + /** + * Get the scaleSettings property: Online deployment scaling configuration. + * + * @return the scaleSettings value. + */ + public OnlineScaleSettings scaleSettings() { + return this.scaleSettings; + } + + /** + * Set the scaleSettings property: Online deployment scaling configuration. + * + * @param scaleSettings the scaleSettings value to set. + * @return the PartialOnlineDeployment object itself. + */ + public PartialOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + this.scaleSettings = scaleSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (livenessProbe() != null) { + livenessProbe().validate(); + } + if (requestSettings() != null) { + requestSettings().validate(); + } + if (scaleSettings() != null) { + scaleSettings().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineDeploymentPartialTrackedResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineDeploymentPartialTrackedResource.java new file mode 100644 index 000000000000..e0f4d43a8595 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineDeploymentPartialTrackedResource.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public final class PartialOnlineDeploymentPartialTrackedResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(PartialOnlineDeploymentPartialTrackedResource.class); + + /* + * Service identity associated with a resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * The geo-location where the resource lives. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties") + private PartialOnlineDeployment properties; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Service identity associated with a resource. + * + * @param identity the identity value to set. + * @return the PartialOnlineDeploymentPartialTrackedResource object itself. + */ + public PartialOnlineDeploymentPartialTrackedResource withIdentity(ResourceIdentity 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 PartialOnlineDeploymentPartialTrackedResource object itself. + */ + public PartialOnlineDeploymentPartialTrackedResource withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the PartialOnlineDeploymentPartialTrackedResource object itself. + */ + public PartialOnlineDeploymentPartialTrackedResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public PartialOnlineDeployment properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the PartialOnlineDeploymentPartialTrackedResource object itself. + */ + public PartialOnlineDeploymentPartialTrackedResource withProperties(PartialOnlineDeployment properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PartialOnlineDeploymentPartialTrackedResource object itself. + */ + public PartialOnlineDeploymentPartialTrackedResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineEndpoint.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineEndpoint.java new file mode 100644 index 000000000000..edeea7844bf0 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineEndpoint.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Mutable online endpoint configuration. */ +@Fluent +public final class PartialOnlineEndpoint { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PartialOnlineEndpoint.class); + + /* + * Traffic rules on how the traffic will be routed across deployments. + */ + @JsonProperty(value = "traffic") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map traffic; + + /** + * Get the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @return the traffic value. + */ + public Map traffic() { + return this.traffic; + } + + /** + * Set the traffic property: Traffic rules on how the traffic will be routed across deployments. + * + * @param traffic the traffic value to set. + * @return the PartialOnlineEndpoint object itself. + */ + public PartialOnlineEndpoint withTraffic(Map traffic) { + this.traffic = traffic; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineEndpointPartialTrackedResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineEndpointPartialTrackedResource.java new file mode 100644 index 000000000000..5012b2b98c93 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PartialOnlineEndpointPartialTrackedResource.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Strictly used in update requests. */ +@Fluent +public final class PartialOnlineEndpointPartialTrackedResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PartialOnlineEndpointPartialTrackedResource.class); + + /* + * Service identity associated with a resource. + */ + @JsonProperty(value = "identity") + private ResourceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences + * for resources of the same type. + */ + @JsonProperty(value = "kind") + private String kind; + + /* + * The geo-location where the resource lives. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties") + private PartialOnlineEndpoint properties; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Get the identity property: Service identity associated with a resource. + * + * @return the identity value. + */ + public ResourceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Service identity associated with a resource. + * + * @param identity the identity value to set. + * @return the PartialOnlineEndpointPartialTrackedResource object itself. + */ + public PartialOnlineEndpointPartialTrackedResource withIdentity(ResourceIdentity 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 PartialOnlineEndpointPartialTrackedResource object itself. + */ + public PartialOnlineEndpointPartialTrackedResource withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: The geo-location where the resource lives. + * + * @param location the location value to set. + * @return the PartialOnlineEndpointPartialTrackedResource object itself. + */ + public PartialOnlineEndpointPartialTrackedResource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public PartialOnlineEndpoint properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the PartialOnlineEndpointPartialTrackedResource object itself. + */ + public PartialOnlineEndpointPartialTrackedResource withProperties(PartialOnlineEndpoint properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PartialOnlineEndpointPartialTrackedResource object itself. + */ + public PartialOnlineEndpointPartialTrackedResource withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnection.java index 8de57733b489..304bbc136acd 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnection.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnection.java @@ -34,19 +34,40 @@ public interface PrivateEndpointConnection { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the identity property: The identity of the resource. + * + * @return the identity value. + */ + Identity identity(); + + /** + * Gets the location property: Specifies the location of the resource. * * @return the location value. */ String location(); /** - * Gets the tags property: Resource tags. + * Gets the tags property: Contains resource tags defined as key/value pairs. * * @return the tags value. */ Map tags(); + /** + * Gets the sku property: The sku of the workspace. + * + * @return the sku value. + */ + Sku sku(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the privateEndpoint property: The resource of private end point. * @@ -69,27 +90,6 @@ public interface PrivateEndpointConnection { */ PrivateEndpointConnectionProvisioningState provisioningState(); - /** - * Gets the identity property: The identity of the resource. - * - * @return the identity value. - */ - Identity identity(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Read only system data. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the region of the resource. * @@ -114,40 +114,19 @@ public interface PrivateEndpointConnection { /** The entirety of the PrivateEndpointConnection definition. */ interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** The PrivateEndpointConnection definition stages. */ interface DefinitionStages { /** The first stage of the PrivateEndpointConnection definition. */ - interface Blank extends WithLocation { - } - /** The stage of the PrivateEndpointConnection 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); + interface Blank extends WithParentResource { } /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @return the next definition stage. */ @@ -158,11 +137,12 @@ interface WithParentResource { * the resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithPrivateEndpoint, - DefinitionStages.WithPrivateLinkServiceConnectionState, + extends DefinitionStages.WithLocation, + DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithSku { + DefinitionStages.WithSku, + DefinitionStages.WithPrivateEndpoint, + DefinitionStages.WithPrivateLinkServiceConnectionState { /** * Executes the create request. * @@ -178,40 +158,33 @@ interface WithCreate */ PrivateEndpointConnection create(Context context); } - /** The stage of the PrivateEndpointConnection definition allowing to specify tags. */ - interface WithTags { + /** The stage of the PrivateEndpointConnection definition allowing to specify location. */ + interface WithLocation { /** - * Specifies the tags property: Resource tags.. + * Specifies the region for the resource. * - * @param tags Resource tags. + * @param location Specifies the location of the resource. * @return the next definition stage. */ - WithCreate withTags(Map tags); - } - /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */ - interface WithPrivateEndpoint { + WithCreate withRegion(Region location); + /** - * Specifies the privateEndpoint property: The resource of private end point.. + * Specifies the region for the resource. * - * @param privateEndpoint The resource of private end point. + * @param location Specifies the location of the resource. * @return the next definition stage. */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + WithCreate withRegion(String location); } - /** - * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { + /** The stage of the PrivateEndpointConnection definition allowing to specify tags. */ + interface WithTags { /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. + * Specifies the tags property: Contains resource tags defined as key/value pairs.. * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ - WithCreate withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + WithCreate withTags(Map tags); } /** The stage of the PrivateEndpointConnection definition allowing to specify identity. */ interface WithIdentity { @@ -233,6 +206,31 @@ interface WithSku { */ WithCreate withSku(Sku sku); } + /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */ + interface WithPrivateEndpoint { + /** + * Specifies the privateEndpoint property: The resource of private end point.. + * + * @param privateEndpoint The resource of private end point. + * @return the next definition stage. + */ + WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of + * the connection between service consumer and provider.. + * + * @param privateLinkServiceConnectionState A collection of information about the state of the connection + * between service consumer and provider. + * @return the next definition stage. + */ + WithCreate withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } } /** * Begins update for the PrivateEndpointConnection resource. @@ -244,10 +242,10 @@ interface WithSku { /** The template for PrivateEndpointConnection update. */ interface Update extends UpdateStages.WithTags, - UpdateStages.WithPrivateEndpoint, - UpdateStages.WithPrivateLinkServiceConnectionState, UpdateStages.WithIdentity, - UpdateStages.WithSku { + UpdateStages.WithSku, + UpdateStages.WithPrivateEndpoint, + UpdateStages.WithPrivateLinkServiceConnectionState { /** * Executes the update request. * @@ -268,13 +266,33 @@ interface UpdateStages { /** The stage of the PrivateEndpointConnection update allowing to specify tags. */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Contains resource tags defined as key/value pairs.. * - * @param tags Resource tags. + * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ Update withTags(Map tags); } + /** The stage of the PrivateEndpointConnection update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the resource.. + * + * @param identity The identity of the resource. + * @return the next definition stage. + */ + Update withIdentity(Identity identity); + } + /** The stage of the PrivateEndpointConnection update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The sku of the workspace.. + * + * @param sku The sku of the workspace. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } /** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */ interface WithPrivateEndpoint { /** @@ -298,26 +316,6 @@ interface WithPrivateLinkServiceConnectionState { Update withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState); } - /** The stage of the PrivateEndpointConnection update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - Update withIdentity(Identity identity); - } - /** The stage of the PrivateEndpointConnection update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - Update withSku(Sku sku); - } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnectionListResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 000000000000..8b290135c70b --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.PrivateEndpointConnectionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of private endpoint connection associated with the specified workspace. */ +@Fluent +public final class PrivateEndpointConnectionListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResult.class); + + /* + * Array of private endpoint connections + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the value property: Array of private endpoint connections. + * + * @return the value value. + */ + public List value() { + return this.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. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnections.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnections.java index 129b4ce0590f..1ba973c33a85 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnections.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateEndpointConnections.java @@ -4,15 +4,41 @@ package com.azure.resourcemanager.machinelearningservices.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 PrivateEndpointConnections. */ public interface PrivateEndpointConnections { + /** + * List all the private endpoint connections associated with the 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 list of private endpoint connection associated with the specified workspace. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List all the private endpoint connections associated with the 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 list of private endpoint connection associated with the specified workspace. + */ + PagedIterable list(String resourceGroupName, String workspaceName, Context context); + /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -25,7 +51,7 @@ public interface PrivateEndpointConnections { /** * Gets the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -40,7 +66,7 @@ Response getWithResponse( /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -52,7 +78,7 @@ Response getWithResponse( /** * Deletes the specified private endpoint connection associated with the workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResource.java index 8effde6d1978..4d62deab7101 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResource.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResource.java @@ -6,10 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -17,32 +18,27 @@ /** A private link resource. */ @JsonFlatten @Fluent -public class PrivateLinkResource extends Resource { +public class PrivateLinkResource extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResource.class); /* - * The private link resource group id. + * The identity of the resource. */ - @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) - private String groupId; + @JsonProperty(value = "identity") + private Identity identity; /* - * The private link resource required member names. + * Specifies the location of the resource. */ - @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) - private List requiredMembers; + @JsonProperty(value = "location") + private String location; /* - * The private link resource Private link DNS zone name. + * Contains resource tags defined as key/value pairs. */ - @JsonProperty(value = "properties.requiredZoneNames") - private List requiredZoneNames; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private Identity identity; + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /* * The sku of the workspace. @@ -51,66 +47,86 @@ public class PrivateLinkResource extends Resource { private Sku sku; /* - * Read only system data + * Metadata pertaining to creation and last modification of the resource. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * The private link resource group id. + */ + @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /* + * The private link resource required member names. + */ + @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /* + * The private link resource Private link DNS zone name. + */ + @JsonProperty(value = "properties.requiredZoneNames") + private List requiredZoneNames; + /** - * Get the groupId property: The private link resource group id. + * Get the identity property: The identity of the resource. * - * @return the groupId value. + * @return the identity value. */ - public String groupId() { - return this.groupId; + public Identity identity() { + return this.identity; } /** - * Get the requiredMembers property: The private link resource required member names. + * Set the identity property: The identity of the resource. * - * @return the requiredMembers value. + * @param identity the identity value to set. + * @return the PrivateLinkResource object itself. */ - public List requiredMembers() { - return this.requiredMembers; + public PrivateLinkResource withIdentity(Identity identity) { + this.identity = identity; + return this; } /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * Get the location property: Specifies the location of the resource. * - * @return the requiredZoneNames value. + * @return the location value. */ - public List requiredZoneNames() { - return this.requiredZoneNames; + public String location() { + return this.location; } /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * Set the location property: Specifies the location of the resource. * - * @param requiredZoneNames the requiredZoneNames value to set. + * @param location the location value to set. * @return the PrivateLinkResource object itself. */ - public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; + public PrivateLinkResource withLocation(String location) { + this.location = location; return this; } /** - * Get the identity property: The identity of the resource. + * Get the tags property: Contains resource tags defined as key/value pairs. * - * @return the identity value. + * @return the tags value. */ - public Identity identity() { - return this.identity; + public Map tags() { + return this.tags; } /** - * Set the identity property: The identity of the resource. + * Set the tags property: Contains resource tags defined as key/value pairs. * - * @param identity the identity value to set. + * @param tags the tags value to set. * @return the PrivateLinkResource object itself. */ - public PrivateLinkResource withIdentity(Identity identity) { - this.identity = identity; + public PrivateLinkResource withTags(Map tags) { + this.tags = tags; return this; } @@ -135,7 +151,7 @@ public PrivateLinkResource withSku(Sku sku) { } /** - * Get the systemData property: Read only system data. + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * * @return the systemData value. */ @@ -143,17 +159,41 @@ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ - @Override - public PrivateLinkResource withLocation(String location) { - super.withLocation(location); - return this; + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; } - /** {@inheritDoc} */ - @Override - public PrivateLinkResource withTags(Map tags) { - super.withTags(tags); + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List 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 PrivateLinkResource object itself. + */ + public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; return this; } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResources.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResources.java index cad1df3087ee..9f3c0de1a4a5 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResources.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PrivateLinkResources.java @@ -12,19 +12,19 @@ public interface PrivateLinkResources { /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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 private link resources that need to be created for a workspace. */ - PrivateLinkResourceListResult listByWorkspace(String resourceGroupName, String workspaceName); + PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName); /** * Gets the private link resources that need to be created for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -32,6 +32,6 @@ public interface PrivateLinkResources { * @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. */ - Response listByWorkspaceWithResponse( + Response listWithResponse( String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProbeSettings.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProbeSettings.java new file mode 100644 index 000000000000..4ea4eac00888 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProbeSettings.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** Deployment container liveness/readiness probe configuration. */ +@Fluent +public final class ProbeSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProbeSettings.class); + + /* + * The number of failures to allow before returning an unhealthy status. + */ + @JsonProperty(value = "failureThreshold") + private Integer failureThreshold; + + /* + * The delay before the first probe in ISO 8601 format. + */ + @JsonProperty(value = "initialDelay") + private Duration initialDelay; + + /* + * The length of time between probes in ISO 8601 format. + */ + @JsonProperty(value = "period") + private Duration period; + + /* + * The number of successful probes before returning a healthy status. + */ + @JsonProperty(value = "successThreshold") + private Integer successThreshold; + + /* + * The probe timeout in ISO 8601 format. + */ + @JsonProperty(value = "timeout") + private Duration timeout; + + /** + * Get the failureThreshold property: The number of failures to allow before returning an unhealthy status. + * + * @return the failureThreshold value. + */ + public Integer failureThreshold() { + return this.failureThreshold; + } + + /** + * Set the failureThreshold property: The number of failures to allow before returning an unhealthy status. + * + * @param failureThreshold the failureThreshold value to set. + * @return the ProbeSettings object itself. + */ + public ProbeSettings withFailureThreshold(Integer failureThreshold) { + this.failureThreshold = failureThreshold; + return this; + } + + /** + * Get the initialDelay property: The delay before the first probe in ISO 8601 format. + * + * @return the initialDelay value. + */ + public Duration initialDelay() { + return this.initialDelay; + } + + /** + * Set the initialDelay property: The delay before the first probe in ISO 8601 format. + * + * @param initialDelay the initialDelay value to set. + * @return the ProbeSettings object itself. + */ + public ProbeSettings withInitialDelay(Duration initialDelay) { + this.initialDelay = initialDelay; + return this; + } + + /** + * Get the period property: The length of time between probes in ISO 8601 format. + * + * @return the period value. + */ + public Duration period() { + return this.period; + } + + /** + * Set the period property: The length of time between probes in ISO 8601 format. + * + * @param period the period value to set. + * @return the ProbeSettings object itself. + */ + public ProbeSettings withPeriod(Duration period) { + this.period = period; + return this; + } + + /** + * 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. + * + * @return the timeout value. + */ + 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProgressMetrics.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProgressMetrics.java new file mode 100644 index 000000000000..8678af4fb340 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProgressMetrics.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Progress metrics definition. */ +@Immutable +public final class ProgressMetrics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProgressMetrics.class); + + /* + * The completed datapoint count. + */ + @JsonProperty(value = "completedDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long completedDatapointCount; + + /* + * The time of last successful incremental dataset refresh in UTC. + */ + @JsonProperty(value = "incrementalDatasetLastRefreshTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime incrementalDatasetLastRefreshTime; + + /* + * The skipped datapoint count. + */ + @JsonProperty(value = "skippedDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long skippedDatapointCount; + + /* + * The total datapoint count. + */ + @JsonProperty(value = "totalDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long totalDatapointCount; + + /** + * Get the completedDatapointCount property: The completed datapoint count. + * + * @return the completedDatapointCount value. + */ + public Long completedDatapointCount() { + return this.completedDatapointCount; + } + + /** + * Get the incrementalDatasetLastRefreshTime property: The time of last successful incremental dataset refresh in + * UTC. + * + * @return the incrementalDatasetLastRefreshTime value. + */ + public OffsetDateTime incrementalDatasetLastRefreshTime() { + return this.incrementalDatasetLastRefreshTime; + } + + /** + * Get the skippedDatapointCount property: The skipped datapoint count. + * + * @return the skippedDatapointCount value. + */ + public Long skippedDatapointCount() { + return this.skippedDatapointCount; + } + + /** + * Get the totalDatapointCount property: The total datapoint count. + * + * @return the totalDatapointCount value. + */ + public Long totalDatapointCount() { + return this.totalDatapointCount; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProvisioningStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProvisioningStatus.java new file mode 100644 index 000000000000..8a6975348fb2 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ProvisioningStatus.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProvisioningStatus. */ +public final class ProvisioningStatus extends ExpandableStringEnum { + /** Static value Completed for ProvisioningStatus. */ + public static final ProvisioningStatus COMPLETED = fromString("Completed"); + + /** Static value Provisioning for ProvisioningStatus. */ + public static final ProvisioningStatus PROVISIONING = fromString("Provisioning"); + + /** Static value Failed for ProvisioningStatus. */ + public static final ProvisioningStatus FAILED = fromString("Failed"); + + /** + * Creates or finds a ProvisioningStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningStatus. + */ + @JsonCreator + public static ProvisioningStatus fromString(String name) { + return fromString(name, ProvisioningStatus.class); + } + + /** @return known ProvisioningStatus values. */ + public static Collection values() { + return values(ProvisioningStatus.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PyTorch.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PyTorch.java new file mode 100644 index 000000000000..271a8c36518f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/PyTorch.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** PyTorch distribution configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") +@JsonTypeName("PyTorch") +@Fluent +public final class PyTorch extends DistributionConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PyTorch.class); + + /* + * Total process count for the distributed job. + */ + @JsonProperty(value = "processCount") + private Integer processCount; + + /** + * Get the processCount property: Total process count for the distributed job. + * + * @return the processCount value. + */ + public Integer processCount() { + return this.processCount; + } + + /** + * Set the processCount property: Total process count for the distributed job. + * + * @param processCount the processCount value to set. + * @return the PyTorch object itself. + */ + public PyTorch withProcessCount(Integer processCount) { + this.processCount = processCount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaBaseProperties.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaBaseProperties.java index 91e1ac8adc80..23e0b72d439c 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaBaseProperties.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/QuotaBaseProperties.java @@ -27,7 +27,7 @@ public final class QuotaBaseProperties { private String type; /* - * The maximum permitted quota of the resource. + * Limit. The maximum permitted quota of the resource. */ @JsonProperty(value = "limit") private Long limit; @@ -79,7 +79,7 @@ public QuotaBaseProperties withType(String type) { } /** - * Get the limit property: The maximum permitted quota of the resource. + * Get the limit property: Limit. The maximum permitted quota of the resource. * * @return the limit value. */ @@ -88,7 +88,7 @@ public Long limit() { } /** - * Set the limit property: The maximum permitted quota of the resource. + * Set the limit property: Limit. The maximum permitted quota of the resource. * * @param limit the limit value to set. * @return the QuotaBaseProperties object itself. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RCranPackage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RCranPackage.java deleted file mode 100644 index 1ad94c9709e1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RCranPackage.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The RCranPackage model. */ -@Fluent -public final class RCranPackage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RCranPackage.class); - - /* - * The package name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The repository name. - */ - @JsonProperty(value = "repository") - private String repository; - - /** - * Get the name property: The package name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The package name. - * - * @param name the name value to set. - * @return the RCranPackage object itself. - */ - public RCranPackage withName(String name) { - this.name = name; - return this; - } - - /** - * Get the repository property: The repository name. - * - * @return the repository value. - */ - public String repository() { - return this.repository; - } - - /** - * Set the repository property: The repository name. - * - * @param repository the repository value to set. - * @return the RCranPackage object itself. - */ - public RCranPackage withRepository(String repository) { - this.repository = repository; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackage.java deleted file mode 100644 index a0f7b6ee799b..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackage.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The RGitHubPackage model. */ -@Fluent -public final class RGitHubPackage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RGitHubPackage.class); - - /* - * Repository address in the format username/repo[/subdir][@ref|#pull]. - */ - @JsonProperty(value = "repository") - private String repository; - - /* - * Personal access token to install from a private repo - */ - @JsonProperty(value = "authToken") - private String authToken; - - /** - * Get the repository property: Repository address in the format username/repo[/subdir][@ref|#pull]. - * - * @return the repository value. - */ - public String repository() { - return this.repository; - } - - /** - * Set the repository property: Repository address in the format username/repo[/subdir][@ref|#pull]. - * - * @param repository the repository value to set. - * @return the RGitHubPackage object itself. - */ - public RGitHubPackage withRepository(String repository) { - this.repository = repository; - return this; - } - - /** - * Get the authToken property: Personal access token to install from a private repo. - * - * @return the authToken value. - */ - public String authToken() { - return this.authToken; - } - - /** - * Set the authToken property: Personal access token to install from a private repo. - * - * @param authToken the authToken value to set. - * @return the RGitHubPackage object itself. - */ - public RGitHubPackage withAuthToken(String authToken) { - this.authToken = authToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackageResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackageResponse.java deleted file mode 100644 index b5c892df3a2c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RGitHubPackageResponse.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.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The RGitHubPackageResponse model. */ -@Fluent -public final class RGitHubPackageResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RGitHubPackageResponse.class); - - /* - * Repository address in the format username/repo[/subdir][@ref|#pull]. - */ - @JsonProperty(value = "repository") - private String repository; - - /** - * Get the repository property: Repository address in the format username/repo[/subdir][@ref|#pull]. - * - * @return the repository value. - */ - public String repository() { - return this.repository; - } - - /** - * Set the repository property: Repository address in the format username/repo[/subdir][@ref|#pull]. - * - * @param repository the repository value to set. - * @return the RGitHubPackageResponse object itself. - */ - public RGitHubPackageResponse withRepository(String repository) { - this.repository = repository; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSection.java deleted file mode 100644 index 33723470d7d7..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSection.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The RSection model. */ -@Fluent -public class RSection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RSection.class); - - /* - * The version of R to be installed - */ - @JsonProperty(value = "rVersion") - private String rVersion; - - /* - * Indicates whether the environment is managed by user or by AzureML. - */ - @JsonProperty(value = "userManaged") - private Boolean userManaged; - - /* - * The Rscript path to use if an environment build is not required. - * The path specified gets used to call the user script. - */ - @JsonProperty(value = "rscriptPath") - private String rscriptPath; - - /* - * Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17" - */ - @JsonProperty(value = "snapshotDate") - private String snapshotDate; - - /* - * The CRAN packages to use. - */ - @JsonProperty(value = "cranPackages") - private List cranPackages; - - /* - * The packages directly from GitHub. - */ - @JsonProperty(value = "gitHubPackages") - private List gitHubPackages; - - /* - * The packages from custom urls. - */ - @JsonProperty(value = "customUrlPackages") - private List customUrlPackages; - - /* - * The packages from Bioconductor. - */ - @JsonProperty(value = "bioConductorPackages") - private List bioConductorPackages; - - /** - * Get the rVersion property: The version of R to be installed. - * - * @return the rVersion value. - */ - public String rVersion() { - return this.rVersion; - } - - /** - * Set the rVersion property: The version of R to be installed. - * - * @param rVersion the rVersion value to set. - * @return the RSection object itself. - */ - public RSection withRVersion(String rVersion) { - this.rVersion = rVersion; - return this; - } - - /** - * Get the userManaged property: Indicates whether the environment is managed by user or by AzureML. - * - * @return the userManaged value. - */ - public Boolean userManaged() { - return this.userManaged; - } - - /** - * Set the userManaged property: Indicates whether the environment is managed by user or by AzureML. - * - * @param userManaged the userManaged value to set. - * @return the RSection object itself. - */ - public RSection withUserManaged(Boolean userManaged) { - this.userManaged = userManaged; - return this; - } - - /** - * Get the rscriptPath property: The Rscript path to use if an environment build is not required. The path specified - * gets used to call the user script. - * - * @return the rscriptPath value. - */ - public String rscriptPath() { - return this.rscriptPath; - } - - /** - * Set the rscriptPath property: The Rscript path to use if an environment build is not required. The path specified - * gets used to call the user script. - * - * @param rscriptPath the rscriptPath value to set. - * @return the RSection object itself. - */ - public RSection withRscriptPath(String rscriptPath) { - this.rscriptPath = rscriptPath; - return this; - } - - /** - * Get the snapshotDate property: Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - * - * @return the snapshotDate value. - */ - public String snapshotDate() { - return this.snapshotDate; - } - - /** - * Set the snapshotDate property: Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - * - * @param snapshotDate the snapshotDate value to set. - * @return the RSection object itself. - */ - public RSection withSnapshotDate(String snapshotDate) { - this.snapshotDate = snapshotDate; - return this; - } - - /** - * Get the cranPackages property: The CRAN packages to use. - * - * @return the cranPackages value. - */ - public List cranPackages() { - return this.cranPackages; - } - - /** - * Set the cranPackages property: The CRAN packages to use. - * - * @param cranPackages the cranPackages value to set. - * @return the RSection object itself. - */ - public RSection withCranPackages(List cranPackages) { - this.cranPackages = cranPackages; - return this; - } - - /** - * Get the gitHubPackages property: The packages directly from GitHub. - * - * @return the gitHubPackages value. - */ - public List gitHubPackages() { - return this.gitHubPackages; - } - - /** - * Set the gitHubPackages property: The packages directly from GitHub. - * - * @param gitHubPackages the gitHubPackages value to set. - * @return the RSection object itself. - */ - public RSection withGitHubPackages(List gitHubPackages) { - this.gitHubPackages = gitHubPackages; - return this; - } - - /** - * Get the customUrlPackages property: The packages from custom urls. - * - * @return the customUrlPackages value. - */ - public List customUrlPackages() { - return this.customUrlPackages; - } - - /** - * Set the customUrlPackages property: The packages from custom urls. - * - * @param customUrlPackages the customUrlPackages value to set. - * @return the RSection object itself. - */ - public RSection withCustomUrlPackages(List customUrlPackages) { - this.customUrlPackages = customUrlPackages; - return this; - } - - /** - * Get the bioConductorPackages property: The packages from Bioconductor. - * - * @return the bioConductorPackages value. - */ - public List bioConductorPackages() { - return this.bioConductorPackages; - } - - /** - * Set the bioConductorPackages property: The packages from Bioconductor. - * - * @param bioConductorPackages the bioConductorPackages value to set. - * @return the RSection object itself. - */ - public RSection withBioConductorPackages(List bioConductorPackages) { - this.bioConductorPackages = bioConductorPackages; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cranPackages() != null) { - cranPackages().forEach(e -> e.validate()); - } - if (gitHubPackages() != null) { - gitHubPackages().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSectionResponse.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSectionResponse.java deleted file mode 100644 index 014c39e79d70..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RSectionResponse.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The RSectionResponse model. */ -@Fluent -public class RSectionResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RSectionResponse.class); - - /* - * The version of R to be installed - */ - @JsonProperty(value = "rVersion") - private String rVersion; - - /* - * Indicates whether the environment is managed by user or by AzureML. - */ - @JsonProperty(value = "userManaged") - private Boolean userManaged; - - /* - * The Rscript path to use if an environment build is not required. - * The path specified gets used to call the user script. - */ - @JsonProperty(value = "rscriptPath") - private String rscriptPath; - - /* - * Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17" - */ - @JsonProperty(value = "snapshotDate") - private String snapshotDate; - - /* - * The CRAN packages to use. - */ - @JsonProperty(value = "cranPackages") - private List cranPackages; - - /* - * The packages directly from GitHub. - */ - @JsonProperty(value = "gitHubPackages") - private List gitHubPackages; - - /* - * The packages from custom urls. - */ - @JsonProperty(value = "customUrlPackages") - private List customUrlPackages; - - /* - * The packages from Bioconductor. - */ - @JsonProperty(value = "bioConductorPackages") - private List bioConductorPackages; - - /** - * Get the rVersion property: The version of R to be installed. - * - * @return the rVersion value. - */ - public String rVersion() { - return this.rVersion; - } - - /** - * Set the rVersion property: The version of R to be installed. - * - * @param rVersion the rVersion value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withRVersion(String rVersion) { - this.rVersion = rVersion; - return this; - } - - /** - * Get the userManaged property: Indicates whether the environment is managed by user or by AzureML. - * - * @return the userManaged value. - */ - public Boolean userManaged() { - return this.userManaged; - } - - /** - * Set the userManaged property: Indicates whether the environment is managed by user or by AzureML. - * - * @param userManaged the userManaged value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withUserManaged(Boolean userManaged) { - this.userManaged = userManaged; - return this; - } - - /** - * Get the rscriptPath property: The Rscript path to use if an environment build is not required. The path specified - * gets used to call the user script. - * - * @return the rscriptPath value. - */ - public String rscriptPath() { - return this.rscriptPath; - } - - /** - * Set the rscriptPath property: The Rscript path to use if an environment build is not required. The path specified - * gets used to call the user script. - * - * @param rscriptPath the rscriptPath value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withRscriptPath(String rscriptPath) { - this.rscriptPath = rscriptPath; - return this; - } - - /** - * Get the snapshotDate property: Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - * - * @return the snapshotDate value. - */ - public String snapshotDate() { - return this.snapshotDate; - } - - /** - * Set the snapshotDate property: Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". - * - * @param snapshotDate the snapshotDate value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withSnapshotDate(String snapshotDate) { - this.snapshotDate = snapshotDate; - return this; - } - - /** - * Get the cranPackages property: The CRAN packages to use. - * - * @return the cranPackages value. - */ - public List cranPackages() { - return this.cranPackages; - } - - /** - * Set the cranPackages property: The CRAN packages to use. - * - * @param cranPackages the cranPackages value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withCranPackages(List cranPackages) { - this.cranPackages = cranPackages; - return this; - } - - /** - * Get the gitHubPackages property: The packages directly from GitHub. - * - * @return the gitHubPackages value. - */ - public List gitHubPackages() { - return this.gitHubPackages; - } - - /** - * Set the gitHubPackages property: The packages directly from GitHub. - * - * @param gitHubPackages the gitHubPackages value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withGitHubPackages(List gitHubPackages) { - this.gitHubPackages = gitHubPackages; - return this; - } - - /** - * Get the customUrlPackages property: The packages from custom urls. - * - * @return the customUrlPackages value. - */ - public List customUrlPackages() { - return this.customUrlPackages; - } - - /** - * Set the customUrlPackages property: The packages from custom urls. - * - * @param customUrlPackages the customUrlPackages value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withCustomUrlPackages(List customUrlPackages) { - this.customUrlPackages = customUrlPackages; - return this; - } - - /** - * Get the bioConductorPackages property: The packages from Bioconductor. - * - * @return the bioConductorPackages value. - */ - public List bioConductorPackages() { - return this.bioConductorPackages; - } - - /** - * Set the bioConductorPackages property: The packages from Bioconductor. - * - * @param bioConductorPackages the bioConductorPackages value to set. - * @return the RSectionResponse object itself. - */ - public RSectionResponse withBioConductorPackages(List bioConductorPackages) { - this.bioConductorPackages = bioConductorPackages; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cranPackages() != null) { - cranPackages().forEach(e -> e.validate()); - } - if (gitHubPackages() != null) { - gitHubPackages().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Recurrence.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Recurrence.java new file mode 100644 index 000000000000..d98202a3628c --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Recurrence.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The workflow trigger recurrence for ComputeStartStop schedule type. */ +@Fluent +public final class Recurrence { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Recurrence.class); + + /* + * The recurrence frequency. + */ + @JsonProperty(value = "frequency") + private RecurrenceFrequency frequency; + + /* + * The interval. + */ + @JsonProperty(value = "interval") + private Integer interval; + + /* + * The start time. + */ + @JsonProperty(value = "startTime") + private String startTime; + + /* + * The time zone. + */ + @JsonProperty(value = "timeZone") + private String timeZone; + + /* + * The recurrence schedule + */ + @JsonProperty(value = "schedule") + private RecurrenceSchedule schedule; + + /** + * Get the frequency property: The recurrence frequency. + * + * @return the frequency value. + */ + public RecurrenceFrequency frequency() { + return this.frequency; + } + + /** + * Set the frequency property: The recurrence frequency. + * + * @param frequency the frequency value to set. + * @return the Recurrence object itself. + */ + public Recurrence withFrequency(RecurrenceFrequency frequency) { + this.frequency = frequency; + return this; + } + + /** + * Get the interval property: The interval. + * + * @return the interval value. + */ + public Integer interval() { + return this.interval; + } + + /** + * Set the interval property: The interval. + * + * @param interval the interval value to set. + * @return the Recurrence object itself. + */ + public Recurrence withInterval(Integer interval) { + this.interval = interval; + return this; + } + + /** + * Get the startTime property: The start time. + * + * @return the startTime value. + */ + public String startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The start time. + * + * @param startTime the startTime value to set. + * @return the Recurrence object itself. + */ + public Recurrence withStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the timeZone property: The time zone. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: The time zone. + * + * @param timeZone the timeZone value to set. + * @return the Recurrence object itself. + */ + public Recurrence withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the schedule property: The recurrence schedule. + * + * @return the schedule value. + */ + public RecurrenceSchedule schedule() { + return this.schedule; + } + + /** + * Set the schedule property: The recurrence schedule. + * + * @param schedule the schedule value to set. + * @return the Recurrence object itself. + */ + public Recurrence withSchedule(RecurrenceSchedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (schedule() != null) { + schedule().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RecurrenceFrequency.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RecurrenceFrequency.java new file mode 100644 index 000000000000..b8d6479d3753 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RecurrenceFrequency.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for RecurrenceFrequency. */ +public final class RecurrenceFrequency extends ExpandableStringEnum { + /** Static value NotSpecified for RecurrenceFrequency. */ + public static final RecurrenceFrequency NOT_SPECIFIED = fromString("NotSpecified"); + + /** Static value Second for RecurrenceFrequency. */ + public static final RecurrenceFrequency SECOND = fromString("Second"); + + /** Static value Minute for RecurrenceFrequency. */ + public static final RecurrenceFrequency MINUTE = fromString("Minute"); + + /** Static value Hour for RecurrenceFrequency. */ + public static final RecurrenceFrequency HOUR = fromString("Hour"); + + /** Static value Day for RecurrenceFrequency. */ + public static final RecurrenceFrequency DAY = fromString("Day"); + + /** Static value Week for RecurrenceFrequency. */ + public static final RecurrenceFrequency WEEK = fromString("Week"); + + /** Static value Month for RecurrenceFrequency. */ + public static final RecurrenceFrequency MONTH = fromString("Month"); + + /** Static value Year for RecurrenceFrequency. */ + public static final RecurrenceFrequency YEAR = fromString("Year"); + + /** + * Creates or finds a RecurrenceFrequency from its string representation. + * + * @param name a name to look for. + * @return the corresponding RecurrenceFrequency. + */ + @JsonCreator + public static RecurrenceFrequency fromString(String name) { + return fromString(name, RecurrenceFrequency.class); + } + + /** @return known RecurrenceFrequency values. */ + public static Collection values() { + return values(RecurrenceFrequency.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RecurrenceSchedule.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RecurrenceSchedule.java new file mode 100644 index 000000000000..d70e935c9fe1 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RecurrenceSchedule.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The recurrence schedule. */ +@Fluent +public final class RecurrenceSchedule { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecurrenceSchedule.class); + + /* + * The minutes. + */ + @JsonProperty(value = "minutes") + private List minutes; + + /* + * The hours. + */ + @JsonProperty(value = "hours") + private List hours; + + /* + * The days of the week. + */ + @JsonProperty(value = "weekDays") + private List weekDays; + + /** + * Get the minutes property: The minutes. + * + * @return the minutes value. + */ + public List minutes() { + return this.minutes; + } + + /** + * Set the minutes property: The minutes. + * + * @param minutes the minutes value to set. + * @return the RecurrenceSchedule object itself. + */ + public RecurrenceSchedule withMinutes(List minutes) { + this.minutes = minutes; + return this; + } + + /** + * Get the hours property: The hours. + * + * @return the hours value. + */ + public List hours() { + return this.hours; + } + + /** + * Set the hours property: The hours. + * + * @param hours the hours value to set. + * @return the RecurrenceSchedule object itself. + */ + public RecurrenceSchedule withHours(List hours) { + this.hours = hours; + return this; + } + + /** + * Get the weekDays property: The days of the week. + * + * @return the weekDays value. + */ + public List weekDays() { + return this.weekDays; + } + + /** + * Set the weekDays property: The days of the week. + * + * @param weekDays the weekDays value to set. + * @return the RecurrenceSchedule object itself. + */ + public RecurrenceSchedule withWeekDays(List weekDays) { + this.weekDays = weekDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ReferenceType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ReferenceType.java new file mode 100644 index 000000000000..9cd88cb17fea --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ReferenceType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ReferenceType. */ +public final class ReferenceType extends ExpandableStringEnum { + /** Static value Id for ReferenceType. */ + public static final ReferenceType ID = fromString("Id"); + + /** Static value DataPath for ReferenceType. */ + public static final ReferenceType DATA_PATH = fromString("DataPath"); + + /** Static value OutputPath for ReferenceType. */ + public static final ReferenceType OUTPUT_PATH = fromString("OutputPath"); + + /** + * Creates or finds a ReferenceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ReferenceType. + */ + @JsonCreator + public static ReferenceType fromString(String name) { + return fromString(name, ReferenceType.class); + } + + /** @return known ReferenceType values. */ + public static Collection values() { + return values(ReferenceType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RegenerateEndpointKeysRequest.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RegenerateEndpointKeysRequest.java new file mode 100644 index 000000000000..4eb8a938ae6f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/RegenerateEndpointKeysRequest.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RegenerateEndpointKeysRequest model. */ +@Fluent +public final class RegenerateEndpointKeysRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RegenerateEndpointKeysRequest.class); + + /* + * Specification for which type of key to generate. Primary or Secondary. + */ + @JsonProperty(value = "keyType", required = true) + private KeyType keyType; + + /* + * The value the key is set to. + */ + @JsonProperty(value = "keyValue") + private String keyValue; + + /** + * Get the keyType property: Specification for which type of key to generate. Primary or Secondary. + * + * @return the keyType value. + */ + public KeyType keyType() { + return this.keyType; + } + + /** + * Set the keyType property: Specification for which type of key to generate. Primary or Secondary. + * + * @param keyType the keyType value to set. + * @return the RegenerateEndpointKeysRequest object itself. + */ + public RegenerateEndpointKeysRequest withKeyType(KeyType keyType) { + this.keyType = keyType; + return this; + } + + /** + * Get the keyValue property: The value the key is set to. + * + * @return the keyValue value. + */ + public String keyValue() { + return this.keyValue; + } + + /** + * Set the keyValue property: The value the key is set to. + * + * @param keyValue the keyValue value to set. + * @return the RegenerateEndpointKeysRequest object itself. + */ + public RegenerateEndpointKeysRequest withKeyValue(String keyValue) { + this.keyValue = keyValue; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property keyType in model RegenerateEndpointKeysRequest")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentity.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentity.java new file mode 100644 index 000000000000..e368ca760f28 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentity.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Service identity associated with a resource. */ +@Fluent +public class ResourceIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceIdentity.class); + + /* + * Client ID that is used when authenticating. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * AAD Tenant where this identity lives. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /* + * Defines values for a ResourceIdentity's type. + */ + @JsonProperty(value = "type") + private ResourceIdentityAssignment type; + + /* + * Dictionary of the user assigned identities, key is ARM resource ID of + * the UAI. + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map userAssignedIdentities; + + /** + * Get the principalId property: Client ID that is used when authenticating. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: AAD Tenant where this identity lives. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: Defines values for a ResourceIdentity's type. + * + * @return the type value. + */ + public ResourceIdentityAssignment type() { + return this.type; + } + + /** + * Set the type property: Defines values for a ResourceIdentity's type. + * + * @param type the type value to set. + * @return the ResourceIdentity object itself. + */ + public ResourceIdentity withType(ResourceIdentityAssignment type) { + this.type = type; + return this; + } + + /** + * Get the userAssignedIdentities property: Dictionary of the user assigned identities, key is ARM resource ID of + * the UAI. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: Dictionary of the user assigned identities, key is ARM resource ID of + * the UAI. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ResourceIdentity object itself. + */ + public ResourceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentityAssignment.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentityAssignment.java new file mode 100644 index 000000000000..1cd39d3186ab --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceIdentityAssignment.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ResourceIdentityAssignment. */ +public final class ResourceIdentityAssignment extends ExpandableStringEnum { + /** Static value SystemAssigned for ResourceIdentityAssignment. */ + public static final ResourceIdentityAssignment SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** Static value UserAssigned for ResourceIdentityAssignment. */ + public static final ResourceIdentityAssignment USER_ASSIGNED = fromString("UserAssigned"); + + /** Static value SystemAssigned,UserAssigned for ResourceIdentityAssignment. */ + public static final ResourceIdentityAssignment SYSTEM_ASSIGNED_USER_ASSIGNED = + fromString("SystemAssigned,UserAssigned"); + + /** Static value None for ResourceIdentityAssignment. */ + public static final ResourceIdentityAssignment NONE = fromString("None"); + + /** + * Creates or finds a ResourceIdentityAssignment from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceIdentityAssignment. + */ + @JsonCreator + public static ResourceIdentityAssignment fromString(String name) { + return fromString(name, ResourceIdentityAssignment.class); + } + + /** @return known ResourceIdentityAssignment values. */ + public static Collection values() { + return values(ResourceIdentityAssignment.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceQuota.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceQuota.java index 4d49fe276b8a..95cbd4351c96 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceQuota.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceQuota.java @@ -37,7 +37,7 @@ 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/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Route.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Route.java new file mode 100644 index 000000000000..da2bce516305 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Route.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Route model. */ +@Fluent +public final class Route { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Route.class); + + /* + * The path for the route. + */ + @JsonProperty(value = "path", required = true) + private String path; + + /* + * The port for the route. + */ + @JsonProperty(value = "port", required = true) + private int port; + + /** + * Get the path property: The path for the route. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The path for the route. + * + * @param path the path value to set. + * @return the Route object itself. + */ + public Route withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the port property: The port for the route. + * + * @return the port value. + */ + public int port() { + return this.port; + } + + /** + * Set the port property: The port for the route. + * + * @param port the port value to set. + * @return the Route object itself. + */ + public Route withPort(int port) { + this.port = port; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (path() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property path in model Route")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SamplingAlgorithm.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SamplingAlgorithm.java new file mode 100644 index 000000000000..66626ff8ce94 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SamplingAlgorithm.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SamplingAlgorithm. */ +public final class SamplingAlgorithm extends ExpandableStringEnum { + /** Static value Grid for SamplingAlgorithm. */ + public static final SamplingAlgorithm GRID = fromString("Grid"); + + /** Static value Random for SamplingAlgorithm. */ + public static final SamplingAlgorithm RANDOM = fromString("Random"); + + /** Static value Bayesian for SamplingAlgorithm. */ + public static final SamplingAlgorithm BAYESIAN = fromString("Bayesian"); + + /** + * Creates or finds a SamplingAlgorithm from its string representation. + * + * @param name a name to look for. + * @return the corresponding SamplingAlgorithm. + */ + @JsonCreator + public static SamplingAlgorithm fromString(String name) { + return fromString(name, SamplingAlgorithm.class); + } + + /** @return known SamplingAlgorithm values. */ + public static Collection values() { + return values(SamplingAlgorithm.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SasDatastoreCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SasDatastoreCredentials.java new file mode 100644 index 000000000000..a4af4a7421ef --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SasDatastoreCredentials.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** SAS datastore credentials configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") +@JsonTypeName("Sas") +@Fluent +public final class SasDatastoreCredentials extends DatastoreCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SasDatastoreCredentials.class); + + /* + * Storage container secrets. + */ + @JsonProperty(value = "secrets") + private SasDatastoreSecrets secrets; + + /** + * Get the secrets property: Storage container secrets. + * + * @return the secrets value. + */ + public SasDatastoreSecrets secrets() { + return this.secrets; + } + + /** + * Set the secrets property: Storage container secrets. + * + * @param secrets the secrets value to set. + * @return the SasDatastoreCredentials object itself. + */ + public SasDatastoreCredentials withSecrets(SasDatastoreSecrets 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 (secrets() != null) { + secrets().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SasDatastoreSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SasDatastoreSecrets.java new file mode 100644 index 000000000000..63e31a6c2553 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SasDatastoreSecrets.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Datastore SAS secrets. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") +@JsonTypeName("Sas") +@Fluent +public final class SasDatastoreSecrets extends DatastoreSecretsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SasDatastoreSecrets.class); + + /* + * Storage container SAS token. + */ + @JsonProperty(value = "sasToken") + private String sasToken; + + /** + * Get the sasToken property: Storage container SAS token. + * + * @return the sasToken value. + */ + public String sasToken() { + return this.sasToken; + } + + /** + * Set the sasToken property: Storage container SAS token. + * + * @param sasToken the sasToken value to set. + * @return the SasDatastoreSecrets object itself. + */ + public SasDatastoreSecrets withSasToken(String sasToken) { + this.sasToken = sasToken; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScaleType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScaleType.java new file mode 100644 index 000000000000..a0e2e9fde637 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScaleType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ScaleType. */ +public final class ScaleType extends ExpandableStringEnum { + /** Static value Auto for ScaleType. */ + public static final ScaleType AUTO = fromString("Auto"); + + /** Static value Manual for ScaleType. */ + public static final ScaleType MANUAL = fromString("Manual"); + + /** + * Creates or finds a ScaleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScaleType. + */ + @JsonCreator + public static ScaleType fromString(String name) { + return fromString(name, ScaleType.class); + } + + /** @return known ScaleType values. */ + public static Collection values() { + return values(ScaleType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScheduleStatus.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScheduleStatus.java new file mode 100644 index 000000000000..f35cf760172e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ScheduleStatus.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ScheduleStatus. */ +public final class ScheduleStatus extends ExpandableStringEnum { + /** Static value Enabled for ScheduleStatus. */ + public static final ScheduleStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for ScheduleStatus. */ + public static final ScheduleStatus DISABLED = fromString("Disabled"); + + /** + * Creates or finds a ScheduleStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScheduleStatus. + */ + @JsonCreator + public static ScheduleStatus fromString(String name) { + return fromString(name, ScheduleStatus.class); + } + + /** @return known ScheduleStatus values. */ + public static Collection values() { + return values(ScheduleStatus.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SecretsType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SecretsType.java new file mode 100644 index 000000000000..6aa3d6b7cb44 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SecretsType.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SecretsType. */ +public final class SecretsType extends ExpandableStringEnum { + /** Static value AccountKey for SecretsType. */ + public static final SecretsType ACCOUNT_KEY = fromString("AccountKey"); + + /** Static value Certificate for SecretsType. */ + public static final SecretsType CERTIFICATE = fromString("Certificate"); + + /** Static value None for SecretsType. */ + public static final SecretsType NONE = fromString("None"); + + /** Static value Sas for SecretsType. */ + public static final SecretsType SAS = fromString("Sas"); + + /** Static value ServicePrincipal for SecretsType. */ + public static final SecretsType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); + + /** Static value SqlAdmin for SecretsType. */ + public static final SecretsType SQL_ADMIN = fromString("SqlAdmin"); + + /** + * Creates or finds a SecretsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecretsType. + */ + @JsonCreator + public static SecretsType fromString(String name) { + return fromString(name, SecretsType.class); + } + + /** @return known SecretsType values. */ + public static Collection values() { + return values(SecretsType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServicePrincipalDatastoreCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServicePrincipalDatastoreCredentials.java new file mode 100644 index 000000000000..1235269e7d67 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServicePrincipalDatastoreCredentials.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.UUID; + +/** Service Principal datastore credentials configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") +@JsonTypeName("ServicePrincipal") +@Fluent +public final class ServicePrincipalDatastoreCredentials extends DatastoreCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicePrincipalDatastoreCredentials.class); + + /* + * Authority URL used for authentication. + */ + @JsonProperty(value = "authorityUrl") + private String authorityUrl; + + /* + * Service principal client ID. + */ + @JsonProperty(value = "clientId", required = true) + private UUID clientId; + + /* + * Resource the service principal has access to. + */ + @JsonProperty(value = "resourceUri") + private String resourceUri; + + /* + * Service principal secrets. + */ + @JsonProperty(value = "secrets") + private ServicePrincipalDatastoreSecrets secrets; + + /* + * ID of the tenant to which the service principal belongs. + */ + @JsonProperty(value = "tenantId", required = true) + private UUID tenantId; + + /** + * Get the authorityUrl property: Authority URL used for authentication. + * + * @return the authorityUrl value. + */ + public String authorityUrl() { + return this.authorityUrl; + } + + /** + * Set the authorityUrl property: Authority URL used for authentication. + * + * @param authorityUrl the authorityUrl value to set. + * @return the ServicePrincipalDatastoreCredentials object itself. + */ + public ServicePrincipalDatastoreCredentials withAuthorityUrl(String authorityUrl) { + this.authorityUrl = authorityUrl; + return this; + } + + /** + * Get the clientId property: Service principal client ID. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.clientId; + } + + /** + * Set the clientId property: Service principal client ID. + * + * @param clientId the clientId value to set. + * @return the ServicePrincipalDatastoreCredentials object itself. + */ + public ServicePrincipalDatastoreCredentials withClientId(UUID clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the resourceUri property: Resource the service principal has access to. + * + * @return the resourceUri value. + */ + public String resourceUri() { + return this.resourceUri; + } + + /** + * Set the resourceUri property: Resource the service principal has access to. + * + * @param resourceUri the resourceUri value to set. + * @return the ServicePrincipalDatastoreCredentials object itself. + */ + public ServicePrincipalDatastoreCredentials withResourceUri(String resourceUri) { + this.resourceUri = resourceUri; + return this; + } + + /** + * Get the secrets property: Service principal secrets. + * + * @return the secrets value. + */ + public ServicePrincipalDatastoreSecrets secrets() { + return this.secrets; + } + + /** + * Set the secrets property: Service principal secrets. + * + * @param secrets the secrets value to set. + * @return the ServicePrincipalDatastoreCredentials object itself. + */ + public ServicePrincipalDatastoreCredentials withSecrets(ServicePrincipalDatastoreSecrets secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the tenantId property: ID of the tenant to which the service principal belongs. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: 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(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (clientId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property clientId in model ServicePrincipalDatastoreCredentials")); + } + if (secrets() != null) { + secrets().validate(); + } + if (tenantId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property tenantId in model ServicePrincipalDatastoreCredentials")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServicePrincipalDatastoreSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServicePrincipalDatastoreSecrets.java new file mode 100644 index 000000000000..93b66ce6b93b --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServicePrincipalDatastoreSecrets.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Datastore Service Principal secrets. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") +@JsonTypeName("ServicePrincipal") +@Fluent +public final class ServicePrincipalDatastoreSecrets extends DatastoreSecretsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicePrincipalDatastoreSecrets.class); + + /* + * Service principal secret. + */ + @JsonProperty(value = "clientSecret") + private String clientSecret; + + /** + * Get the clientSecret property: Service principal secret. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret property: Service principal secret. + * + * @param clientSecret the clientSecret value to set. + * @return the ServicePrincipalDatastoreSecrets object itself. + */ + public ServicePrincipalDatastoreSecrets withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResource.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResource.java deleted file mode 100644 index 97657d744b9e..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResource.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.machinelearningservices.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner; -import java.util.Map; - -/** An immutable client-side representation of ServiceResource. */ -public interface ServiceResource { - /** - * 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: Service properties. - * - * @return the properties value. - */ - ServiceResponseBase properties(); - - /** - * Gets the identity property: The identity of the resource. - * - * @return the identity value. - */ - Identity identity(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Read only system data. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.ServiceResourceInner object. - * - * @return the inner object. - */ - ServiceResourceInner innerModel(); - - /** The entirety of the ServiceResource definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The ServiceResource definition stages. */ - interface DefinitionStages { - /** The first stage of the ServiceResource definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ServiceResource definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** - * The stage of the ServiceResource 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.WithLocation, - DefinitionStages.WithDescription, - DefinitionStages.WithKvTags, - DefinitionStages.WithProperties, - DefinitionStages.WithKeys, - DefinitionStages.WithEnvironmentImageRequest { - /** - * Executes the create request. - * - * @return the created resource. - */ - ServiceResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ServiceResource create(Context context); - } - /** The stage of the ServiceResource definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The name of the Azure location/region. - * @return the next definition stage. - */ - WithCreate withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The name of the Azure location/region. - * @return the next definition stage. - */ - WithCreate withRegion(String location); - } - /** The stage of the ServiceResource definition allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The description of the service.. - * - * @param description The description of the service. - * @return the next definition stage. - */ - WithCreate withDescription(String description); - } - /** The stage of the ServiceResource definition allowing to specify kvTags. */ - interface WithKvTags { - /** - * Specifies the kvTags property: The service tag dictionary. Tags are mutable.. - * - * @param kvTags The service tag dictionary. Tags are mutable. - * @return the next definition stage. - */ - WithCreate withKvTags(Map kvTags); - } - /** The stage of the ServiceResource definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: The service properties dictionary. Properties are immutable.. - * - * @param properties The service properties dictionary. Properties are immutable. - * @return the next definition stage. - */ - WithCreate withProperties(Map properties); - } - /** The stage of the ServiceResource definition allowing to specify keys. */ - interface WithKeys { - /** - * Specifies the keys property: The authentication keys.. - * - * @param keys The authentication keys. - * @return the next definition stage. - */ - WithCreate withKeys(CreateServiceRequestKeys keys); - } - /** The stage of the ServiceResource definition allowing to specify environmentImageRequest. */ - interface WithEnvironmentImageRequest { - /** - * Specifies the environmentImageRequest property: The Environment, models and assets needed for - * inferencing.. - * - * @param environmentImageRequest The Environment, models and assets needed for inferencing. - * @return the next definition stage. - */ - WithCreate withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest); - } - } - /** - * Begins update for the ServiceResource resource. - * - * @return the stage of resource update. - */ - ServiceResource.Update update(); - - /** The template for ServiceResource update. */ - interface Update - extends UpdateStages.WithDescription, - UpdateStages.WithKvTags, - UpdateStages.WithProperties, - UpdateStages.WithKeys, - UpdateStages.WithEnvironmentImageRequest { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ServiceResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ServiceResource apply(Context context); - } - /** The ServiceResource update stages. */ - interface UpdateStages { - /** The stage of the ServiceResource update allowing to specify description. */ - interface WithDescription { - /** - * Specifies the description property: The description of the service.. - * - * @param description The description of the service. - * @return the next definition stage. - */ - Update withDescription(String description); - } - /** The stage of the ServiceResource update allowing to specify kvTags. */ - interface WithKvTags { - /** - * Specifies the kvTags property: The service tag dictionary. Tags are mutable.. - * - * @param kvTags The service tag dictionary. Tags are mutable. - * @return the next definition stage. - */ - Update withKvTags(Map kvTags); - } - /** The stage of the ServiceResource update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: The service properties dictionary. Properties are immutable.. - * - * @param properties The service properties dictionary. Properties are immutable. - * @return the next definition stage. - */ - Update withProperties(Map properties); - } - /** The stage of the ServiceResource update allowing to specify keys. */ - interface WithKeys { - /** - * Specifies the keys property: The authentication keys.. - * - * @param keys The authentication keys. - * @return the next definition stage. - */ - Update withKeys(CreateServiceRequestKeys keys); - } - /** The stage of the ServiceResource update allowing to specify environmentImageRequest. */ - interface WithEnvironmentImageRequest { - /** - * Specifies the environmentImageRequest property: The Environment, models and assets needed for - * inferencing.. - * - * @param environmentImageRequest The Environment, models and assets needed for inferencing. - * @return the next definition stage. - */ - Update withEnvironmentImageRequest(CreateServiceRequestEnvironmentImageRequest environmentImageRequest); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ServiceResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ServiceResource refresh(Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBase.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBase.java deleted file mode 100644 index d48ae950585c..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBase.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** - * The base service response. The correct inherited response based on computeType will be returned (ex. - * ACIServiceResponse). - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = ServiceResponseBase.class) -@JsonTypeName("ServiceResponseBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "ACI", value = AciServiceResponse.class), - @JsonSubTypes.Type(name = "Custom", value = AksVariantResponse.class) -}) -@Fluent -public class ServiceResponseBase { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResponseBase.class); - - /* - * The service description. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The service tag dictionary. Tags are mutable. - */ - @JsonProperty(value = "kvTags") - private Map kvTags; - - /* - * The service property dictionary. Properties are immutable. - */ - @JsonProperty(value = "properties") - private Map properties; - - /* - * The current state of the service. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private WebServiceState state; - - /* - * The error details. - */ - @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) - private ServiceResponseBaseError error; - - /* - * The deployment type for the service. - */ - @JsonProperty(value = "deploymentType") - private DeploymentType deploymentType; - - /** - * Get the description property: The service description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The service description. - * - * @param description the description value to set. - * @return the ServiceResponseBase object itself. - */ - public ServiceResponseBase withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the kvTags property: The service tag dictionary. Tags are mutable. - * - * @return the kvTags value. - */ - public Map kvTags() { - return this.kvTags; - } - - /** - * Set the kvTags property: The service tag dictionary. Tags are mutable. - * - * @param kvTags the kvTags value to set. - * @return the ServiceResponseBase object itself. - */ - public ServiceResponseBase withKvTags(Map kvTags) { - this.kvTags = kvTags; - return this; - } - - /** - * Get the properties property: The service property dictionary. Properties are immutable. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: The service property dictionary. Properties are immutable. - * - * @param properties the properties value to set. - * @return the ServiceResponseBase object itself. - */ - public ServiceResponseBase withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the state property: The current state of the service. - * - * @return the state value. - */ - public WebServiceState state() { - return this.state; - } - - /** - * Get the error property: The error details. - * - * @return the error value. - */ - public ServiceResponseBaseError error() { - return this.error; - } - - /** - * Get the deploymentType property: The deployment type for the service. - * - * @return the deploymentType value. - */ - public DeploymentType deploymentType() { - return this.deploymentType; - } - - /** - * Set the deploymentType property: The deployment type for the service. - * - * @param deploymentType the deploymentType value to set. - * @return the ServiceResponseBase object itself. - */ - public ServiceResponseBase withDeploymentType(DeploymentType deploymentType) { - this.deploymentType = deploymentType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (error() != null) { - error().validate(); - } - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBaseError.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBaseError.java deleted file mode 100644 index 91b6e51e5caf..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ServiceResponseBaseError.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; - -/** The error details. */ -@Immutable -public final class ServiceResponseBaseError extends ManagementError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceResponseBaseError.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SparkMavenPackage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SparkMavenPackage.java deleted file mode 100644 index 2fef06f7c8b1..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SparkMavenPackage.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The SparkMavenPackage model. */ -@Fluent -public final class SparkMavenPackage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SparkMavenPackage.class); - - /* - * The group property. - */ - @JsonProperty(value = "group") - private String group; - - /* - * The artifact property. - */ - @JsonProperty(value = "artifact") - private String artifact; - - /* - * The version property. - */ - @JsonProperty(value = "version") - private String version; - - /** - * Get the group property: The group property. - * - * @return the group value. - */ - public String group() { - return this.group; - } - - /** - * Set the group property: The group property. - * - * @param group the group value to set. - * @return the SparkMavenPackage object itself. - */ - public SparkMavenPackage withGroup(String group) { - this.group = group; - return this; - } - - /** - * Get the artifact property: The artifact property. - * - * @return the artifact value. - */ - public String artifact() { - return this.artifact; - } - - /** - * Set the artifact property: The artifact property. - * - * @param artifact the artifact value to set. - * @return the SparkMavenPackage object itself. - */ - public SparkMavenPackage withArtifact(String artifact) { - this.artifact = artifact; - return this; - } - - /** - * Get the version property: The version property. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The version property. - * - * @param version the version value to set. - * @return the SparkMavenPackage object itself. - */ - public SparkMavenPackage withVersion(String version) { - this.version = version; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SqlAdminDatastoreCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SqlAdminDatastoreCredentials.java new file mode 100644 index 000000000000..1f29f744ef3f --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SqlAdminDatastoreCredentials.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** SQL Admin datastore credentials configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") +@JsonTypeName("SqlAdmin") +@Fluent +public final class SqlAdminDatastoreCredentials extends DatastoreCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlAdminDatastoreCredentials.class); + + /* + * SQL database secrets. + */ + @JsonProperty(value = "secrets") + private SqlAdminDatastoreSecrets secrets; + + /* + * SQL database user name. + */ + @JsonProperty(value = "userId", required = true) + private String userId; + + /** + * Get the secrets property: SQL database secrets. + * + * @return the secrets value. + */ + public SqlAdminDatastoreSecrets secrets() { + return this.secrets; + } + + /** + * Set the secrets property: SQL database secrets. + * + * @param secrets the secrets value to set. + * @return the SqlAdminDatastoreCredentials object itself. + */ + public SqlAdminDatastoreCredentials withSecrets(SqlAdminDatastoreSecrets secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the userId property: SQL database user name. + * + * @return the userId value. + */ + public String userId() { + return this.userId; + } + + /** + * Set the userId property: SQL database user name. + * + * @param userId the userId value to set. + * @return the SqlAdminDatastoreCredentials object itself. + */ + public SqlAdminDatastoreCredentials withUserId(String userId) { + this.userId = userId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (secrets() != null) { + secrets().validate(); + } + if (userId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property userId in model SqlAdminDatastoreCredentials")); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SqlAdminDatastoreSecrets.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SqlAdminDatastoreSecrets.java new file mode 100644 index 000000000000..e303b3006423 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SqlAdminDatastoreSecrets.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearningservices.fluent.models.DatastoreSecretsInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Datastore SQL Admin secrets. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") +@JsonTypeName("SqlAdmin") +@Fluent +public final class SqlAdminDatastoreSecrets extends DatastoreSecretsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlAdminDatastoreSecrets.class); + + /* + * SQL database password. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the password property: SQL database password. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: SQL database password. + * + * @param password the password value to set. + * @return the SqlAdminDatastoreSecrets object itself. + */ + public SqlAdminDatastoreSecrets withPassword(String password) { + this.password = password; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StatusMessage.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StatusMessage.java new file mode 100644 index 000000000000..dc782870a7d5 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StatusMessage.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Active message associated with project. */ +@Immutable +public final class StatusMessage { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StatusMessage.class); + + /* + * Service-defined message code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Time in UTC at which the message was created. + */ + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; + + /* + * Severity level of message. + */ + @JsonProperty(value = "level", access = JsonProperty.Access.WRITE_ONLY) + private StatusMessageLevel level; + + /* + * A human-readable representation of the message code. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the code property: Service-defined message code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the createdTimeUtc property: Time in UTC at which the message was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; + } + + /** + * Get the level property: Severity level of message. + * + * @return the level value. + */ + public StatusMessageLevel level() { + return this.level; + } + + /** + * Get the message property: A human-readable representation of the message code. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StatusMessageLevel.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StatusMessageLevel.java new file mode 100644 index 000000000000..42f489c2d131 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StatusMessageLevel.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for StatusMessageLevel. */ +public final class StatusMessageLevel extends ExpandableStringEnum { + /** Static value Error for StatusMessageLevel. */ + public static final StatusMessageLevel ERROR = fromString("Error"); + + /** Static value Information for StatusMessageLevel. */ + public static final StatusMessageLevel INFORMATION = fromString("Information"); + + /** Static value Warning for StatusMessageLevel. */ + public static final StatusMessageLevel WARNING = fromString("Warning"); + + /** + * Creates or finds a StatusMessageLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding StatusMessageLevel. + */ + @JsonCreator + public static StatusMessageLevel fromString(String name) { + return fromString(name, StatusMessageLevel.class); + } + + /** @return known StatusMessageLevel values. */ + public static Collection values() { + return values(StatusMessageLevel.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StorageAccounts.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StorageAccounts.java deleted file mode 100644 index 9a16ff0fb526..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/StorageAccounts.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of StorageAccounts. */ -public interface StorageAccounts { - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - ListStorageAccountKeysResult listKeys(String resourceGroupName, String workspaceName); - - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @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. - */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SweepJob.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SweepJob.java new file mode 100644 index 000000000000..8ffed586420e --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/SweepJob.java @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.Duration; +import java.util.Map; + +/** Sweep job definition. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") +@JsonTypeName("Sweep") +@Fluent +public final class SweepJob extends JobBase { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SweepJob.class); + + /* + * Type of the hyperparameter sampling algorithms + */ + @JsonProperty(value = "algorithm", required = true) + private SamplingAlgorithm algorithm; + + /* + * Compute binding for the job. + */ + @JsonProperty(value = "compute", required = true) + private ComputeConfiguration compute; + + /* + * Early termination policies enable canceling poor-performing runs before + * they complete. + */ + @JsonProperty(value = "earlyTermination") + private EarlyTerminationPolicy earlyTermination; + + /* + * The name of the experiment the job belongs to. If not set, the job is + * placed in the "Default" experiment. + */ + @JsonProperty(value = "experimentName") + private String experimentName; + + /* + * Identity configuration. If set, this should be one of AmlToken, + * ManagedIdentity or null. + * Defaults to AmlToken if null. + */ + @JsonProperty(value = "identity") + private IdentityConfiguration identity; + + /* + * An upper bound on the number of trials performed in parallel. + */ + @JsonProperty(value = "maxConcurrentTrials") + private Integer maxConcurrentTrials; + + /* + * An upper bound on the number of trials to perform. + */ + @JsonProperty(value = "maxTotalTrials") + private Integer maxTotalTrials; + + /* + * Optimization objective. + */ + @JsonProperty(value = "objective", required = true) + private Objective objective; + + /* + * Location of the job output logs and artifacts. + */ + @JsonProperty(value = "output", access = JsonProperty.Access.WRITE_ONLY) + private JobOutput output; + + /* + * Job priority for scheduling policy. Only applies to AMLCompute. + * Private preview feature and only available to users on the allow list. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /* + * A dictionary containing each parameter and its distribution. The + * dictionary key is the name of the parameter + */ + @JsonProperty(value = "searchSpace", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map searchSpace; + + /* + * The status of a job. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private JobStatus status; + + /* + * The total timeout in ISO 8601 format. Only supports duration with + * precision as low as Minutes. + */ + @JsonProperty(value = "timeout") + private Duration timeout; + + /* + * Trial component definition. + */ + @JsonProperty(value = "trial") + private TrialComponent trial; + + /** + * Get the algorithm property: Type of the hyperparameter sampling algorithms. + * + * @return the algorithm value. + */ + public SamplingAlgorithm algorithm() { + return this.algorithm; + } + + /** + * Set the algorithm property: Type of the hyperparameter sampling algorithms. + * + * @param algorithm the algorithm value to set. + * @return the SweepJob object itself. + */ + public SweepJob withAlgorithm(SamplingAlgorithm algorithm) { + this.algorithm = algorithm; + return this; + } + + /** + * Get the compute property: Compute binding for the job. + * + * @return the compute value. + */ + public ComputeConfiguration compute() { + return this.compute; + } + + /** + * Set the compute property: Compute binding for the job. + * + * @param compute the compute value to set. + * @return the SweepJob object itself. + */ + public SweepJob withCompute(ComputeConfiguration compute) { + this.compute = compute; + 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 experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in + * the "Default" experiment. + * + * @return the experimentName value. + */ + public String experimentName() { + return this.experimentName; + } + + /** + * 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 experimentName the experimentName value to set. + * @return the SweepJob object itself. + */ + public SweepJob withExperimentName(String experimentName) { + this.experimentName = experimentName; + return this; + } + + /** + * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity or + * null. Defaults to AmlToken if null. + * + * @return the identity value. + */ + public IdentityConfiguration identity() { + return this.identity; + } + + /** + * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity or + * null. Defaults to AmlToken if null. + * + * @param identity the identity value to set. + * @return the SweepJob object itself. + */ + public SweepJob withIdentity(IdentityConfiguration identity) { + this.identity = identity; + return this; + } + + /** + * Get the maxConcurrentTrials property: An upper bound on the number of trials performed in parallel. + * + * @return the maxConcurrentTrials value. + */ + public Integer maxConcurrentTrials() { + return this.maxConcurrentTrials; + } + + /** + * Set the maxConcurrentTrials property: An upper bound on the number of trials performed in parallel. + * + * @param maxConcurrentTrials the maxConcurrentTrials value to set. + * @return the SweepJob object itself. + */ + public SweepJob withMaxConcurrentTrials(Integer maxConcurrentTrials) { + this.maxConcurrentTrials = maxConcurrentTrials; + return this; + } + + /** + * Get the maxTotalTrials property: An upper bound on the number of trials to perform. + * + * @return the maxTotalTrials value. + */ + public Integer maxTotalTrials() { + return this.maxTotalTrials; + } + + /** + * Set the maxTotalTrials property: An upper bound on the number of trials to perform. + * + * @param maxTotalTrials the maxTotalTrials value to set. + * @return the SweepJob object itself. + */ + public SweepJob withMaxTotalTrials(Integer maxTotalTrials) { + this.maxTotalTrials = maxTotalTrials; + return this; + } + + /** + * Get the objective property: Optimization objective. + * + * @return the objective value. + */ + public Objective objective() { + return this.objective; + } + + /** + * Set the objective property: Optimization objective. + * + * @param objective the objective value to set. + * @return the SweepJob object itself. + */ + public SweepJob withObjective(Objective objective) { + this.objective = objective; + return this; + } + + /** + * Get the output property: Location of the job output logs and artifacts. + * + * @return the output value. + */ + public JobOutput output() { + return this.output; + } + + /** + * Get the priority property: Job priority for scheduling policy. Only applies to AMLCompute. Private preview + * feature and only available to users on the allow list. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: Job priority for scheduling policy. Only applies to AMLCompute. Private preview + * feature and only available to users on the allow list. + * + * @param priority the priority value to set. + * @return the SweepJob object itself. + */ + public SweepJob withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the searchSpace property: A dictionary containing each parameter and its distribution. The dictionary key is + * the name of the parameter. + * + * @return the searchSpace value. + */ + public Map searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: A dictionary containing each parameter and its distribution. The dictionary key is + * the name of the parameter. + * + * @param searchSpace the searchSpace value to set. + * @return the SweepJob object itself. + */ + public SweepJob withSearchSpace(Map searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the status property: The status of a job. + * + * @return the status value. + */ + public JobStatus status() { + return this.status; + } + + /** + * Get the timeout property: The total timeout in ISO 8601 format. Only supports duration with precision as low as + * Minutes. + * + * @return the timeout value. + */ + public Duration timeout() { + return this.timeout; + } + + /** + * Set the timeout property: The total timeout in ISO 8601 format. Only supports duration with precision as low as + * Minutes. + * + * @param timeout the timeout value to set. + * @return the SweepJob object itself. + */ + public SweepJob withTimeout(Duration timeout) { + this.timeout = timeout; + return this; + } + + /** + * Get the trial property: Trial component definition. + * + * @return the trial value. + */ + public TrialComponent trial() { + return this.trial; + } + + /** + * Set the trial property: Trial component definition. + * + * @param trial the trial value to set. + * @return the SweepJob object itself. + */ + public SweepJob withTrial(TrialComponent trial) { + this.trial = trial; + return this; + } + + /** {@inheritDoc} */ + @Override + public SweepJob withDescription(String description) { + super.withDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public SweepJob withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** {@inheritDoc} */ + @Override + public SweepJob withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (algorithm() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property algorithm in model SweepJob")); + } + if (compute() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property compute in model SweepJob")); + } else { + compute().validate(); + } + if (earlyTermination() != null) { + earlyTermination().validate(); + } + if (identity() != null) { + identity().validate(); + } + if (objective() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property objective in model SweepJob")); + } else { + objective().validate(); + } + if (output() != null) { + output().validate(); + } + if (searchSpace() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property searchSpace in model SweepJob")); + } + if (trial() != null) { + trial().validate(); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TensorFlow.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TensorFlow.java new file mode 100644 index 000000000000..15459be695af --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TensorFlow.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** TensorFlow distribution configuration. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") +@JsonTypeName("TensorFlow") +@Fluent +public final class TensorFlow extends DistributionConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TensorFlow.class); + + /* + * Number of parameter server tasks. + */ + @JsonProperty(value = "parameterServerCount") + private Integer parameterServerCount; + + /* + * Number of workers. Overwrites the node count in compute binding. + */ + @JsonProperty(value = "workerCount") + private Integer workerCount; + + /** + * Get the parameterServerCount property: Number of parameter server tasks. + * + * @return the parameterServerCount value. + */ + public Integer parameterServerCount() { + return this.parameterServerCount; + } + + /** + * Set the parameterServerCount property: Number of parameter server tasks. + * + * @param parameterServerCount the parameterServerCount value to set. + * @return the TensorFlow object itself. + */ + public TensorFlow withParameterServerCount(Integer parameterServerCount) { + this.parameterServerCount = parameterServerCount; + return this; + } + + /** + * Get the workerCount property: Number of workers. Overwrites the node count in compute binding. + * + * @return the workerCount value. + */ + public Integer workerCount() { + return this.workerCount; + } + + /** + * Set the workerCount property: Number of workers. Overwrites the node count in compute binding. + * + * @param workerCount the workerCount value to set. + * @return the TensorFlow object itself. + */ + public TensorFlow withWorkerCount(Integer workerCount) { + this.workerCount = workerCount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TextAnnotationType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TextAnnotationType.java new file mode 100644 index 000000000000..f942ed31fac3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TextAnnotationType.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for TextAnnotationType. */ +public final class TextAnnotationType extends ExpandableStringEnum { + /** Static value Classification for TextAnnotationType. */ + public static final TextAnnotationType CLASSIFICATION = fromString("Classification"); + + /** + * Creates or finds a TextAnnotationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TextAnnotationType. + */ + @JsonCreator + public static TextAnnotationType fromString(String name) { + return fromString(name, TextAnnotationType.class); + } + + /** @return known TextAnnotationType values. */ + public static Collection values() { + return values(TextAnnotationType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TrialComponent.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TrialComponent.java new file mode 100644 index 000000000000..3e387e9c24e3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TrialComponent.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; +import java.util.Map; + +/** Trial component definition. */ +@Fluent +public final class TrialComponent { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TrialComponent.class); + + /* + * ARM resource ID of the code asset. + */ + @JsonProperty(value = "codeId") + private String codeId; + + /* + * The command to execute on startup of the job. eg. "python train.py" + */ + @JsonProperty(value = "command", required = true) + private String command; + + /* + * Distribution configuration of the job. If set, this should be one of + * Mpi, Tensorflow, PyTorch, or null. + */ + @JsonProperty(value = "distribution") + private DistributionConfiguration distribution; + + /* + * The ARM resource ID of the Environment specification for the job. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * Environment variables included in the job. + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Mapping of input data bindings used in the job. + */ + @JsonProperty(value = "inputDataBindings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map inputDataBindings; + + /* + * Mapping of output data bindings used in the job. + */ + @JsonProperty(value = "outputDataBindings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map outputDataBindings; + + /* + * The max run duration in ISO 8601 format, after which the trial component + * will be cancelled. + * Only supports duration with precision as low as Seconds. + */ + @JsonProperty(value = "timeout") + private Duration timeout; + + /** + * Get the codeId property: ARM resource ID of the code asset. + * + * @return the codeId value. + */ + public String codeId() { + return this.codeId; + } + + /** + * Set the codeId property: ARM resource ID of the code asset. + * + * @param codeId the codeId value to set. + * @return the TrialComponent object itself. + */ + public TrialComponent withCodeId(String codeId) { + this.codeId = codeId; + return this; + } + + /** + * Get the command property: The command to execute on startup of the job. eg. "python train.py". + * + * @return the command value. + */ + public String command() { + return this.command; + } + + /** + * Set the command property: The command to execute on startup of the job. eg. "python train.py". + * + * @param command the command value to set. + * @return the TrialComponent object itself. + */ + public TrialComponent withCommand(String command) { + this.command = 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: The ARM resource ID of the Environment specification for the job. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: The ARM resource ID of the Environment specification for the job. + * + * @param environmentId the environmentId value to set. + * @return the TrialComponent object itself. + */ + public TrialComponent withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the environmentVariables property: Environment variables included in the job. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment variables included in the job. + * + * @param environmentVariables the environmentVariables value to set. + * @return the TrialComponent object itself. + */ + public TrialComponent withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the inputDataBindings property: Mapping of input data bindings used in the job. + * + * @return the inputDataBindings value. + */ + public Map inputDataBindings() { + return this.inputDataBindings; + } + + /** + * Set the inputDataBindings property: Mapping of input data bindings used in the job. + * + * @param inputDataBindings the inputDataBindings value to set. + * @return the TrialComponent object itself. + */ + public TrialComponent withInputDataBindings(Map inputDataBindings) { + this.inputDataBindings = inputDataBindings; + return this; + } + + /** + * Get the outputDataBindings property: Mapping of output data bindings used in the job. + * + * @return the outputDataBindings value. + */ + public Map outputDataBindings() { + return this.outputDataBindings; + } + + /** + * Set the outputDataBindings property: Mapping of output data bindings used in the job. + * + * @param outputDataBindings the outputDataBindings value to set. + * @return the TrialComponent object itself. + */ + public TrialComponent withOutputDataBindings(Map outputDataBindings) { + this.outputDataBindings = outputDataBindings; + return this; + } + + /** + * Get the timeout property: The max run duration in ISO 8601 format, after which the trial component will be + * cancelled. Only supports duration with precision as low as Seconds. + * + * @return the timeout value. + */ + public Duration timeout() { + return this.timeout; + } + + /** + * Set the timeout property: The max run duration in ISO 8601 format, after which the trial component will be + * cancelled. Only supports duration with precision as low as Seconds. + * + * @param timeout the timeout value to set. + * @return the TrialComponent object itself. + */ + public TrialComponent withTimeout(Duration timeout) { + this.timeout = timeout; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (command() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property command in model TrialComponent")); + } + if (distribution() != null) { + distribution().validate(); + } + if (inputDataBindings() != null) { + inputDataBindings() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (outputDataBindings() != null) { + outputDataBindings() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TriggerType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TriggerType.java new file mode 100644 index 000000000000..b475e6724297 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TriggerType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for TriggerType. */ +public final class TriggerType extends ExpandableStringEnum { + /** Static value Recurrence for TriggerType. */ + public static final TriggerType RECURRENCE = fromString("Recurrence"); + + /** Static value Cron for TriggerType. */ + public static final TriggerType CRON = fromString("Cron"); + + /** + * Creates or finds a TriggerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TriggerType. + */ + @JsonCreator + public static TriggerType fromString(String name) { + return fromString(name, TriggerType.class); + } + + /** @return known TriggerType values. */ + public static Collection values() { + return values(TriggerType.class); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TruncationSelectionPolicy.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TruncationSelectionPolicy.java new file mode 100644 index 000000000000..b2dd9bfd0bd0 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/TruncationSelectionPolicy.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") +@JsonTypeName("TruncationSelection") +@Fluent +public final class TruncationSelectionPolicy extends EarlyTerminationPolicy { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TruncationSelectionPolicy.class); + + /* + * The percentage of runs to cancel at each evaluation interval. + */ + @JsonProperty(value = "truncationPercentage") + private Integer truncationPercentage; + + /** + * Get the truncationPercentage property: The percentage of runs to cancel at each evaluation interval. + * + * @return the truncationPercentage value. + */ + public Integer truncationPercentage() { + return this.truncationPercentage; + } + + /** + * Set the truncationPercentage property: The percentage of runs to cancel at each evaluation interval. + * + * @param truncationPercentage the truncationPercentage value to set. + * @return the TruncationSelectionPolicy object itself. + */ + public TruncationSelectionPolicy withTruncationPercentage(Integer truncationPercentage) { + this.truncationPercentage = truncationPercentage; + return this; + } + + /** {@inheritDoc} */ + @Override + public TruncationSelectionPolicy withDelayEvaluation(Integer delayEvaluation) { + super.withDelayEvaluation(delayEvaluation); + return this; + } + + /** {@inheritDoc} */ + @Override + public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotas.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotas.java index 7ec7492795d9..67334d69efe5 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotas.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UpdateWorkspaceQuotas.java @@ -27,7 +27,7 @@ public final class UpdateWorkspaceQuotas { private String type; /* - * The maximum permitted quota of the resource. + * Limit. The maximum permitted quota of the resource. */ @JsonProperty(value = "limit") private Long limit; @@ -39,7 +39,7 @@ public final class UpdateWorkspaceQuotas { private QuotaUnit unit; /* - * Status of update workspace quota. + * Update Workspace Quota Status. Status of update workspace quota. */ @JsonProperty(value = "status") private Status status; @@ -63,7 +63,7 @@ public String type() { } /** - * Get the limit property: The maximum permitted quota of the resource. + * Get the limit property: Limit. The maximum permitted quota of the resource. * * @return the limit value. */ @@ -72,7 +72,7 @@ public Long limit() { } /** - * Set the limit property: The maximum permitted quota of the resource. + * Set the limit property: Limit. The maximum permitted quota of the resource. * * @param limit the limit value to set. * @return the UpdateWorkspaceQuotas object itself. @@ -92,7 +92,7 @@ public QuotaUnit unit() { } /** - * Get the status property: Status of update workspace quota. + * Get the status property: Update Workspace Quota Status. Status of update workspace quota. * * @return the status value. */ @@ -101,7 +101,7 @@ public Status status() { } /** - * Set the status property: Status of update workspace quota. + * Set the status property: Update Workspace Quota Status. Status of update workspace quota. * * @param status the status value to set. * @return the UpdateWorkspaceQuotas object itself. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAccountCredentials.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAccountCredentials.java index 20cb550c0fac..40722d4dfd1a 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAccountCredentials.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAccountCredentials.java @@ -15,26 +15,27 @@ public final class UserAccountCredentials { @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAccountCredentials.class); /* - * Name of the administrator user account which can be used to SSH to - * nodes. + * User name. Name of the administrator user account which can be used to + * SSH to nodes. */ @JsonProperty(value = "adminUserName", required = true) private String adminUsername; /* - * SSH public key of the administrator user account. + * SSH public key. SSH public key of the administrator user account. */ @JsonProperty(value = "adminUserSshPublicKey") private String adminUserSshPublicKey; /* - * Password of the administrator user account. + * Password. Password of the administrator user account. */ @JsonProperty(value = "adminUserPassword") private String adminUserPassword; /** - * 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. */ @@ -43,7 +44,8 @@ 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. @@ -54,7 +56,7 @@ 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. */ @@ -63,7 +65,7 @@ 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. @@ -74,7 +76,7 @@ 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. */ @@ -83,7 +85,7 @@ 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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAssignedIdentityMeta.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAssignedIdentityMeta.java new file mode 100644 index 000000000000..b1c12d270bb3 --- /dev/null +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/UserAssignedIdentityMeta.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearningservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** User assigned identities associated with a resource. */ +@Fluent +public final class UserAssignedIdentityMeta { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentityMeta.class); + + /* + * Aka application ID, a unique identifier generated by Azure AD that is + * tied to an application and service principal during its initial + * provisioning. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The object ID of the service principal object for your managed identity + * that is used to grant role-based access to an Azure resource. + */ + @JsonProperty(value = "principalId") + private String principalId; + + /** + * Get the clientId property: Aka application ID, a unique identifier generated by Azure AD that is tied to an + * application and service principal during its initial provisioning. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: Aka application ID, a unique identifier generated by Azure AD that is tied to an + * application and service principal during its initial provisioning. + * + * @param clientId the clientId value to set. + * @return the UserAssignedIdentityMeta object itself. + */ + public UserAssignedIdentityMeta withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the principalId property: The object ID of the service principal object for your managed identity that is + * used to grant role-based access to an Azure resource. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principalId property: The object ID of the service principal object for your managed identity that is + * used to grant role-based access to an Azure resource. + * + * @param principalId the principalId value to set. + * @return the UserAssignedIdentityMeta object itself. + */ + public UserAssignedIdentityMeta withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VariantType.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VariantType.java deleted file mode 100644 index 7e03450aef11..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VariantType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VariantType. */ -public final class VariantType extends ExpandableStringEnum { - /** Static value Control for VariantType. */ - public static final VariantType CONTROL = fromString("Control"); - - /** Static value Treatment for VariantType. */ - public static final VariantType TREATMENT = fromString("Treatment"); - - /** - * Creates or finds a VariantType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VariantType. - */ - @JsonCreator - public static VariantType fromString(String name) { - return fromString(name, VariantType.class); - } - - /** @return known VariantType values. */ - public static Collection values() { - return values(VariantType.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSize.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSize.java index f8e25bb6f8b5..43ee14f5a99c 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSize.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSize.java @@ -15,55 +15,61 @@ public final class VirtualMachineSize { @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualMachineSize.class); /* - * The name of the virtual machine size. + * Virtual Machine size name The name of the virtual machine size. */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * The family name of the virtual machine size. + * Virtual Machine family name The family name of the virtual machine size. */ @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) private String family; /* - * The number of vCPUs supported by the virtual machine size. + * Number of vPUs The number of vCPUs supported by the virtual machine + * size. */ @JsonProperty(value = "vCPUs", access = JsonProperty.Access.WRITE_ONLY) private Integer vCPUs; /* - * The number of gPUs supported by the virtual machine size. + * Number of gPUs The number of gPUs supported by the virtual machine size. */ @JsonProperty(value = "gpus", access = JsonProperty.Access.WRITE_ONLY) private Integer gpus; /* - * The OS VHD disk size, in MB, allowed by the virtual machine size. + * OS VHD Disk size The OS VHD disk size, in MB, allowed by the virtual + * machine size. */ @JsonProperty(value = "osVhdSizeMB", access = JsonProperty.Access.WRITE_ONLY) private Integer osVhdSizeMB; /* - * The resource volume size, in MB, allowed by the virtual machine size. + * Resource volume size The resource volume size, in MB, allowed by the + * virtual machine size. */ @JsonProperty(value = "maxResourceVolumeMB", access = JsonProperty.Access.WRITE_ONLY) private Integer maxResourceVolumeMB; /* - * The amount of memory, in GB, supported by the virtual machine size. + * Memory size The amount of memory, in GB, supported by the virtual + * machine size. */ @JsonProperty(value = "memoryGB", access = JsonProperty.Access.WRITE_ONLY) private Double memoryGB; /* - * Specifies if the virtual machine size supports low priority VMs. + * Low priority capable Specifies if the virtual machine size supports low + * priority VMs. */ @JsonProperty(value = "lowPriorityCapable", access = JsonProperty.Access.WRITE_ONLY) private Boolean lowPriorityCapable; /* - * Specifies if the virtual machine size supports premium IO. + * Premium IO supported Specifies if the virtual machine size supports + * premium IO. */ @JsonProperty(value = "premiumIO", access = JsonProperty.Access.WRITE_ONLY) private Boolean premiumIO; @@ -75,7 +81,7 @@ public final class VirtualMachineSize { private EstimatedVMPrices estimatedVMPrices; /** - * Get the name property: The name of the virtual machine size. + * Get the name property: Virtual Machine size name The name of the virtual machine size. * * @return the name value. */ @@ -84,7 +90,7 @@ public String name() { } /** - * Get the family property: The family name of the virtual machine size. + * Get the family property: Virtual Machine family name The family name of the virtual machine size. * * @return the family value. */ @@ -93,7 +99,7 @@ public String family() { } /** - * Get the vCPUs property: The number of vCPUs supported by the virtual machine size. + * Get the vCPUs property: Number of vPUs The number of vCPUs supported by the virtual machine size. * * @return the vCPUs value. */ @@ -102,7 +108,7 @@ public Integer vCPUs() { } /** - * Get the gpus property: The number of gPUs supported by the virtual machine size. + * Get the gpus property: Number of gPUs The number of gPUs supported by the virtual machine size. * * @return the gpus value. */ @@ -111,7 +117,7 @@ public Integer gpus() { } /** - * Get the osVhdSizeMB property: The OS VHD disk size, in MB, allowed by the virtual machine size. + * Get the osVhdSizeMB property: OS VHD Disk size The OS VHD disk size, in MB, allowed by the virtual machine size. * * @return the osVhdSizeMB value. */ @@ -120,7 +126,8 @@ public Integer osVhdSizeMB() { } /** - * Get the maxResourceVolumeMB property: The resource volume size, in MB, allowed by the virtual machine size. + * Get the maxResourceVolumeMB property: Resource volume size The resource volume size, in MB, allowed by the + * virtual machine size. * * @return the maxResourceVolumeMB value. */ @@ -129,7 +136,7 @@ public Integer maxResourceVolumeMB() { } /** - * Get the memoryGB property: The amount of memory, in GB, supported by the virtual machine size. + * Get the memoryGB property: Memory size The amount of memory, in GB, supported by the virtual machine size. * * @return the memoryGB value. */ @@ -138,7 +145,8 @@ public Double memoryGB() { } /** - * Get the lowPriorityCapable property: Specifies if the virtual machine size supports low priority VMs. + * Get the lowPriorityCapable property: Low priority capable Specifies if the virtual machine size supports low + * priority VMs. * * @return the lowPriorityCapable value. */ @@ -147,7 +155,7 @@ public Boolean lowPriorityCapable() { } /** - * Get the premiumIO property: Specifies if the virtual machine size supports premium IO. + * Get the premiumIO property: Premium IO supported Specifies if the virtual machine size supports premium IO. * * @return the premiumIO value. */ diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizeListResult.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizeListResult.java index 12e9a041a0e0..0463c91130ca 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizeListResult.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VirtualMachineSizeListResult.java @@ -10,11 +10,11 @@ /** An immutable client-side representation of VirtualMachineSizeListResult. */ public interface VirtualMachineSizeListResult { /** - * Gets the amlCompute property: The list of virtual machine sizes supported by AmlCompute. + * Gets the value property: The list of virtual machine sizes supported by AmlCompute. * - * @return the amlCompute value. + * @return the value value. */ - List amlCompute(); + List value(); /** * Gets the inner com.azure.resourcemanager.machinelearningservices.fluent.models.VirtualMachineSizeListResultInner diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VnetConfiguration.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VnetConfiguration.java deleted file mode 100644 index 568854c417af..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/VnetConfiguration.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The VnetConfiguration model. */ -@Fluent -public class VnetConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetConfiguration.class); - - /* - * The name of the virtual network. - */ - @JsonProperty(value = "vnetName") - private String vnetName; - - /* - * The name of the virtual network subnet. - */ - @JsonProperty(value = "subnetName") - private String subnetName; - - /** - * Get the vnetName property: The name of the virtual network. - * - * @return the vnetName value. - */ - public String vnetName() { - return this.vnetName; - } - - /** - * Set the vnetName property: The name of the virtual network. - * - * @param vnetName the vnetName value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withVnetName(String vnetName) { - this.vnetName = vnetName; - return this; - } - - /** - * Get the subnetName property: The name of the virtual network subnet. - * - * @return the subnetName value. - */ - public String subnetName() { - return this.subnetName; - } - - /** - * Set the subnetName property: The name of the virtual network subnet. - * - * @param subnetName the subnetName value to set. - * @return the VnetConfiguration object itself. - */ - public VnetConfiguration withSubnetName(String subnetName) { - this.subnetName = subnetName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WebServiceState.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WebServiceState.java deleted file mode 100644 index 59b9ccccc2a5..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WebServiceState.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for WebServiceState. */ -public final class WebServiceState extends ExpandableStringEnum { - /** Static value Transitioning for WebServiceState. */ - public static final WebServiceState TRANSITIONING = fromString("Transitioning"); - - /** Static value Healthy for WebServiceState. */ - public static final WebServiceState HEALTHY = fromString("Healthy"); - - /** Static value Unhealthy for WebServiceState. */ - public static final WebServiceState UNHEALTHY = fromString("Unhealthy"); - - /** Static value Failed for WebServiceState. */ - public static final WebServiceState FAILED = fromString("Failed"); - - /** Static value Unschedulable for WebServiceState. */ - public static final WebServiceState UNSCHEDULABLE = fromString("Unschedulable"); - - /** - * Creates or finds a WebServiceState from its string representation. - * - * @param name a name to look for. - * @return the corresponding WebServiceState. - */ - @JsonCreator - public static WebServiceState fromString(String name) { - return fromString(name, WebServiceState.class); - } - - /** @return known WebServiceState values. */ - public static Collection values() { - return values(WebServiceState.class); - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspace.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspace.java index 9ce76bf26435..f365325860e7 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspace.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspace.java @@ -36,19 +36,40 @@ public interface Workspace { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the identity property: The identity of the resource. + * + * @return the identity value. + */ + Identity identity(); + + /** + * Gets the location property: Specifies the location of the resource. * * @return the location value. */ String location(); /** - * Gets the tags property: Resource tags. + * Gets the tags property: Contains resource tags defined as key/value pairs. * * @return the tags value. */ Map tags(); + /** + * Gets the sku property: The sku of the workspace. + * + * @return the sku value. + */ + Sku sku(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the workspaceId property: The immutable id associated with this workspace. * @@ -206,27 +227,6 @@ public interface Workspace { */ String tenantId(); - /** - * Gets the identity property: The identity of the resource. - * - * @return the identity value. - */ - Identity identity(); - - /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the systemData property: Read only system data. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the region of the resource. * @@ -250,40 +250,19 @@ public interface Workspace { /** The entirety of the Workspace definition. */ interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } /** The Workspace definition stages. */ interface DefinitionStages { /** The first stage of the Workspace definition. */ - interface Blank extends WithLocation { - } - /** The stage of the Workspace definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); + interface Blank extends WithResourceGroup { } /** The stage of the Workspace definition allowing to specify parent resource. */ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -293,7 +272,10 @@ interface WithResourceGroup { * be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, + extends DefinitionStages.WithLocation, + DefinitionStages.WithTags, + DefinitionStages.WithIdentity, + DefinitionStages.WithSku, DefinitionStages.WithDescription, DefinitionStages.WithFriendlyName, DefinitionStages.WithKeyVault, @@ -307,9 +289,7 @@ interface WithCreate DefinitionStages.WithAllowPublicAccessWhenBehindVnet, DefinitionStages.WithSharedPrivateLinkResources, DefinitionStages.WithServiceManagedResourcesSettings, - DefinitionStages.WithPrimaryUserAssignedIdentity, - DefinitionStages.WithIdentity, - DefinitionStages.WithSku { + DefinitionStages.WithPrimaryUserAssignedIdentity { /** * Executes the create request. * @@ -325,16 +305,54 @@ interface WithCreate */ Workspace create(Context context); } + /** The stage of the Workspace definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location Specifies the location of the resource. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location Specifies the location of the resource. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } /** The stage of the Workspace definition allowing to specify tags. */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Contains resource tags defined as key/value pairs.. * - * @param tags Resource tags. + * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ WithCreate withTags(Map tags); } + /** The stage of the Workspace definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the resource.. + * + * @param identity The identity of the resource. + * @return the next definition stage. + */ + WithCreate withIdentity(Identity identity); + } + /** The stage of the Workspace definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: The sku of the workspace.. + * + * @param sku The sku of the workspace. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } /** The stage of the Workspace definition allowing to specify description. */ interface WithDescription { /** @@ -493,26 +511,6 @@ interface WithPrimaryUserAssignedIdentity { */ WithCreate withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); } - /** The stage of the Workspace definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(Identity identity); - } - /** The stage of the Workspace definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } } /** * Begins update for the Workspace resource. @@ -707,4 +705,52 @@ interface WithPrimaryUserAssignedIdentity { * @return the response. */ Response listNotebookAccessTokenWithResponse(Context context); + + /** + * @throws com.azure.core.management.exception.ManagementException thrown 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(); + + /** + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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); + + /** + * @throws com.azure.core.management.exception.ManagementException thrown 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(); + + /** + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response listStorageAccountKeysWithResponse(Context context); + + /** + * @throws com.azure.core.management.exception.ManagementException thrown 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(); + + /** + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response listNotebookKeysWithResponse(Context context); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnection.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnection.java index 0c10207f8862..c219adcff6ca 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnection.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnection.java @@ -86,7 +86,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @return the next definition stage. */ @@ -97,8 +97,7 @@ interface WithParentResource { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithName, - DefinitionStages.WithCategory, + extends DefinitionStages.WithCategory, DefinitionStages.WithTarget, DefinitionStages.WithAuthType, DefinitionStages.WithValue, @@ -118,16 +117,6 @@ interface WithCreate */ WorkspaceConnection create(Context context); } - /** The stage of the WorkspaceConnection definition allowing to specify name. */ - interface WithName { - /** - * Specifies the name property: Friendly name of the workspace connection. - * - * @param name Friendly name of the workspace connection. - * @return the next definition stage. - */ - WithCreate withName(String name); - } /** The stage of the WorkspaceConnection definition allowing to specify category. */ interface WithCategory { /** diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnectionDto.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnectionDto.java deleted file mode 100644 index 74476aaea356..000000000000 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnectionDto.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearningservices.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** object used for creating workspace connection. */ -@JsonFlatten -@Fluent -public class WorkspaceConnectionDto { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceConnectionDto.class); - - /* - * Friendly name of the workspace connection - */ - @JsonProperty(value = "name") - private String name; - - /* - * Category of the workspace connection. - */ - @JsonProperty(value = "properties.category") - private String category; - - /* - * Target of the workspace connection. - */ - @JsonProperty(value = "properties.target") - private String target; - - /* - * Authorization type of the workspace connection. - */ - @JsonProperty(value = "properties.authType") - private String authType; - - /* - * Value details of the workspace connection. - */ - @JsonProperty(value = "properties.value") - private String value; - - /* - * format for the workspace connection value - */ - @JsonProperty(value = "properties.valueFormat") - private ValueFormat valueFormat; - - /** - * Get the name property: Friendly name of the workspace connection. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Friendly name of the workspace connection. - * - * @param name the name value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withName(String name) { - this.name = name; - return this; - } - - /** - * Get the category property: Category of the workspace connection. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Category of the workspace connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the target property: Target of the workspace connection. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: Target of the workspace connection. - * - * @param target the target value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - public String authType() { - return this.authType; - } - - /** - * Set the authType property: Authorization type of the workspace connection. - * - * @param authType the authType value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withAuthType(String authType) { - this.authType = authType; - return this; - } - - /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - public ValueFormat valueFormat() { - return this.valueFormat; - } - - /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionDto object itself. - */ - public WorkspaceConnectionDto withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnections.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnections.java index 78c85f2433be..aa07c458434a 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnections.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceConnections.java @@ -13,7 +13,7 @@ public interface WorkspaceConnections { /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -25,7 +25,7 @@ public interface WorkspaceConnections { /** * List all connections under a AML workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -41,7 +41,7 @@ PagedIterable list( /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -54,7 +54,7 @@ PagedIterable list( /** * Get the detail of a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. @@ -69,7 +69,7 @@ Response getWithResponse( /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -81,7 +81,7 @@ Response getWithResponse( /** * Delete a workspace connection. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceFeatures.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceFeatures.java index 8ddcb302fee7..b1c74a4f7d36 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceFeatures.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceFeatures.java @@ -12,7 +12,7 @@ public interface WorkspaceFeatures { /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -24,7 +24,7 @@ public interface WorkspaceFeatures { /** * Lists all enabled features for a workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceOperations.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceSkus.java similarity index 85% rename from sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceOperations.java rename to sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceSkus.java index 6dbc7ddb14c7..d549d0ff954e 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceOperations.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceSkus.java @@ -7,8 +7,8 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of WorkspaceOperations. */ -public interface WorkspaceOperations { +/** Resource collection API of WorkspaceSkus. */ +public interface WorkspaceSkus { /** * Lists all skus with associated features. * @@ -16,7 +16,7 @@ public interface WorkspaceOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of skus with features. */ - PagedIterable listSkus(); + PagedIterable list(); /** * Lists all skus with associated features. @@ -27,5 +27,5 @@ public interface WorkspaceOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of skus with features. */ - PagedIterable listSkus(Context context); + PagedIterable list(Context context); } diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceUpdateParameters.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceUpdateParameters.java index 476d64375dca..614cdac97ca7 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceUpdateParameters.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/WorkspaceUpdateParameters.java @@ -8,6 +8,7 @@ import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -21,6 +22,7 @@ public class WorkspaceUpdateParameters { * The resource tags for the machine learning workspace. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* diff --git a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspaces.java b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspaces.java index b926e16439e8..33a94688a742 100644 --- a/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspaces.java +++ b/sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/Workspaces.java @@ -13,7 +13,7 @@ public interface Workspaces { /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -25,7 +25,7 @@ public interface Workspaces { /** * Gets the properties of the specified machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -38,7 +38,7 @@ public interface Workspaces { /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -49,7 +49,7 @@ public interface Workspaces { /** * Deletes a machine learning workspace. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -61,7 +61,7 @@ public interface Workspaces { /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -72,7 +72,7 @@ public interface Workspaces { /** * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param skip Continuation token for pagination. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -86,7 +86,7 @@ public interface Workspaces { * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -99,7 +99,7 @@ public interface Workspaces { * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -114,7 +114,7 @@ Response listKeysWithResponse( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -126,7 +126,7 @@ Response listKeysWithResponse( * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -159,7 +159,7 @@ Response listKeysWithResponse( /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -171,7 +171,7 @@ Response listKeysWithResponse( /** * return notebook access token and refresh token. * - * @param resourceGroupName Name of the resource group in which workspace is located. + * @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. @@ -182,6 +182,71 @@ Response listKeysWithResponse( Response listNotebookAccessTokenWithResponse( String resourceGroupName, String workspaceName, Context context); + /** + * @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. + */ + NotebookResourceInfo prepareNotebook(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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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); + + /** + * @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. + */ + ListStorageAccountKeysResult listStorageAccountKeys(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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response listStorageAccountKeysWithResponse( + String resourceGroupName, String workspaceName, Context context); + + /** + * @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. + */ + ListNotebookKeysResult listNotebookKeys(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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response listNotebookKeysWithResponse( + String resourceGroupName, String workspaceName, Context context); + /** * Gets the properties of the specified machine learning workspace. *