From f7f300685a3c340acf562906821b64e99433d3a0 Mon Sep 17 00:00:00 2001 From: Harneet Virk Date: Thu, 21 Jan 2021 12:25:53 -0800 Subject: [PATCH] Bootstrap sdk net for machinelearningservices (#17953) * Add MachineLearningServices track 2 NET SDK --- ...esourceManager.MachineLearningServices.sln | 79 + .../CHANGELOG.md | 6 + .../Directory.Build.props | 6 + .../README.md | 77 + ....MachineLearningServices.netstandard2.0.cs | 3166 +++++++++++++++++ ...urceManager.MachineLearningServices.csproj | 18 + ...zureMachineLearningWorkspacesOperations.cs | 115 + ...MachineLearningWorkspacesRestOperations.cs | 176 + .../src/Generated/CodeContainersOperations.cs | 263 ++ .../Generated/CodeContainersRestOperations.cs | 520 +++ .../src/Generated/CodeVersionsOperations.cs | 279 ++ .../Generated/CodeVersionsRestOperations.cs | 578 +++ .../src/Generated/DataContainersOperations.cs | 263 ++ .../Generated/DataContainersRestOperations.cs | 520 +++ .../src/Generated/DataVersionsOperations.cs | 279 ++ .../Generated/DataVersionsRestOperations.cs | 578 +++ .../src/Generated/DatastoresOperations.cs | 316 ++ .../src/Generated/DatastoresRestOperations.cs | 670 ++++ .../EnvironmentContainersOperations.cs | 263 ++ .../EnvironmentContainersRestOperations.cs | 520 +++ ...ironmentSpecificationVersionsOperations.cs | 279 ++ ...mentSpecificationVersionsRestOperations.cs | 588 +++ .../src/Generated/JobsOperations.cs | 345 ++ .../src/Generated/JobsRestOperations.cs | 707 ++++ .../src/Generated/LabelingJobsOperations.cs | 433 +++ .../Generated/LabelingJobsRestOperations.cs | 906 +++++ .../src/Generated/LinkedServicesOperations.cs | 200 ++ .../Generated/LinkedServicesRestOperations.cs | 428 +++ ...ineLearningComputeCreateOrUpdateHeaders.cs | 23 + ...eLearningComputeCreateOrUpdateOperation.cs | 66 + .../MachineLearningComputeDeleteHeaders.cs | 25 + .../MachineLearningComputeDeleteOperation.cs | 62 + .../MachineLearningComputeOperations.cs | 613 ++++ .../MachineLearningComputeRestOperations.cs | 1071 ++++++ .../MachineLearningComputeUpdateOperation.cs | 66 + ...ineLearningServiceCreateOrUpdateHeaders.cs | 23 + ...eLearningServiceCreateOrUpdateOperation.cs | 66 + .../MachineLearningServiceOperations.cs | 319 ++ .../MachineLearningServiceRestOperations.cs | 587 +++ ...MachineLearningServicesManagementClient.cs | 131 + ...LearningServicesManagementClientOptions.cs | 16 + .../Generated/ModelContainersOperations.cs | 265 ++ .../ModelContainersRestOperations.cs | 528 +++ .../src/Generated/ModelVersionsOperations.cs | 295 ++ .../Generated/ModelVersionsRestOperations.cs | 642 ++++ .../ACIServiceCreateRequest.Serialization.cs | 120 + .../Models/ACIServiceCreateRequest.cs | 42 + ...eateRequestDataCollection.Serialization.cs | 61 + .../ACIServiceCreateRequestDataCollection.cs | 25 + ...questEncryptionProperties.Serialization.cs | 53 + ...erviceCreateRequestEncryptionProperties.cs | 36 + ...eRequestVnetConfiguration.Serialization.cs | 51 + ...CIServiceCreateRequestVnetConfiguration.cs | 25 + .../ACIServiceResponse.Serialization.cs | 389 ++ .../Generated/Models/ACIServiceResponse.cs | 110 + ...iceResponseDataCollection.Serialization.cs | 61 + .../ACIServiceResponseDataCollection.cs | 25 + ...ponseEncryptionProperties.Serialization.cs | 53 + .../ACIServiceResponseEncryptionProperties.cs | 36 + ...seEnvironmentImageRequest.Serialization.cs | 151 + ...IServiceResponseEnvironmentImageRequest.cs | 31 + ...ResponseVnetConfiguration.Serialization.cs | 51 + .../ACIServiceResponseVnetConfiguration.cs | 25 + .../src/Generated/Models/AKS.Serialization.cs | 148 + .../src/Generated/Models/AKS.cs | 42 + .../Models/AKSProperties.Serialization.cs | 116 + .../src/Generated/Models/AKSProperties.cs | 52 + .../Models/AKSReplicaStatus.Serialization.cs | 67 + .../src/Generated/Models/AKSReplicaStatus.cs | 40 + .../AKSReplicaStatusError.Serialization.cs | 52 + .../Generated/Models/AKSReplicaStatusError.cs | 28 + .../AKSServiceCreateRequest.Serialization.cs | 145 + .../Models/AKSServiceCreateRequest.cs | 46 + ...ceCreateRequestAutoScaler.Serialization.cs | 109 + .../AKSServiceCreateRequestAutoScaler.cs | 28 + ...eateRequestDataCollection.Serialization.cs | 61 + .../AKSServiceCreateRequestDataCollection.cs | 25 + ...LivenessProbeRequirements.Serialization.cs | 109 + ...eCreateRequestLivenessProbeRequirements.cs | 28 + .../AKSServiceResponse.Serialization.cs | 468 +++ .../Generated/Models/AKSServiceResponse.cs | 117 + ...ServiceResponseAutoScaler.Serialization.cs | 109 + .../Models/AKSServiceResponseAutoScaler.cs | 28 + ...iceResponseDataCollection.Serialization.cs | 61 + .../AKSServiceResponseDataCollection.cs | 25 + ...eResponseDeploymentStatus.Serialization.cs | 67 + .../AKSServiceResponseDeploymentStatus.cs | 27 + ...seEnvironmentImageRequest.Serialization.cs | 151 + ...SServiceResponseEnvironmentImageRequest.cs | 31 + ...LivenessProbeRequirements.Serialization.cs | 109 + ...erviceResponseLivenessProbeRequirements.cs | 28 + .../AKSVariantResponse.Serialization.cs | 196 + .../Generated/Models/AKSVariantResponse.cs | 47 + .../Models/AccountKeySection.Serialization.cs | 40 + .../src/Generated/Models/AccountKeySection.cs | 28 + .../Models/AksComputeSecrets.Serialization.cs | 47 + .../src/Generated/Models/AksComputeSecrets.cs | 39 + ...ksNetworkingConfiguration.Serialization.cs | 73 + .../Models/AksNetworkingConfiguration.cs | 40 + .../src/Generated/Models/AllocationState.cs | 51 + .../Models/AmlCompute.Serialization.cs | 148 + .../src/Generated/Models/AmlCompute.cs | 42 + ...AmlComputeNodeInformation.Serialization.cs | 69 + .../Models/AmlComputeNodeInformation.cs | 48 + ...mlComputeNodesInformation.Serialization.cs | 52 + .../Models/AmlComputeNodesInformation.cs | 36 + .../AmlComputeProperties.Serialization.cs | 257 ++ .../Generated/Models/AmlComputeProperties.cs | 93 + .../Models/AmlUserFeature.Serialization.cs | 41 + .../src/Generated/Models/AmlUserFeature.cs | 36 + .../Models/ApplicationSharingPolicy.cs | 51 + .../Models/AssetPath.Serialization.cs | 53 + .../src/Generated/Models/AssetPath.cs | 42 + .../Models/AssignedUser.Serialization.cs | 45 + .../src/Generated/Models/AssignedUser.cs | 39 + .../Models/AuthKeys.Serialization.cs | 31 + .../src/Generated/Models/AuthKeys.cs | 23 + .../Models/AutoScaler.Serialization.cs | 109 + .../src/Generated/Models/AutoScaler.cs | 44 + .../AzureDataLakeSection.Serialization.cs | 45 + .../Generated/Models/AzureDataLakeSection.cs | 38 + .../Models/AzureMySqlSection.Serialization.cs | 69 + .../src/Generated/Models/AzureMySqlSection.cs | 58 + .../AzurePostgreSqlSection.Serialization.cs | 85 + .../Models/AzurePostgreSqlSection.cs | 77 + .../AzureSqlDatabaseSection.Serialization.cs | 69 + .../Models/AzureSqlDatabaseSection.cs | 58 + .../AzureStorageSection.Serialization.cs | 85 + .../Generated/Models/AzureStorageSection.cs | 81 + .../src/Generated/Models/BillingCurrency.cs | 48 + .../CertificateSection.Serialization.cs | 87 + .../Generated/Models/CertificateSection.cs | 62 + .../ClusterUpdateParameters.Serialization.cs | 29 + .../Models/ClusterUpdateParameters.cs | 21 + .../Models/CodeConfiguration.Serialization.cs | 48 + .../src/Generated/Models/CodeConfiguration.cs | 42 + .../Models/CodeContainer.Serialization.cs | 95 + .../src/Generated/Models/CodeContainer.cs | 40 + .../CodeContainerResource.Serialization.cs | 66 + .../Generated/Models/CodeContainerResource.cs | 53 + ...esourceArmPaginatedResult.Serialization.cs | 46 + ...CodeContainerResourceArmPaginatedResult.cs | 35 + .../Models/CodeVersion.Serialization.cs | 122 + .../src/Generated/Models/CodeVersion.cs | 49 + .../CodeVersionResource.Serialization.cs | 66 + .../Generated/Models/CodeVersionResource.cs | 54 + ...esourceArmPaginatedResult.Serialization.cs | 46 + .../CodeVersionResourceArmPaginatedResult.cs | 35 + .../Models/CommandJob.Serialization.cs | 243 ++ .../src/Generated/Models/CommandJob.cs | 78 + .../Generated/Models/Compute.Serialization.cs | 146 + .../src/Generated/Models/Compute.cs | 65 + .../Models/ComputeBinding.Serialization.cs | 72 + .../src/Generated/Models/ComputeBinding.cs | 36 + .../Models/ComputeEnvironmentType.cs | 51 + .../Models/ComputeInstance.Serialization.cs | 148 + .../src/Generated/Models/ComputeInstance.cs | 42 + ...omputeInstanceApplication.Serialization.cs | 35 + .../Models/ComputeInstanceApplication.cs | 32 + .../ComputeInstanceAuthorizationType.cs | 48 + ...anceConnectivityEndpoints.Serialization.cs | 35 + .../ComputeInstanceConnectivityEndpoints.cs | 32 + .../ComputeInstanceCreatedBy.Serialization.cs | 41 + .../Models/ComputeInstanceCreatedBy.cs | 36 + ...puteInstanceLastOperation.Serialization.cs | 57 + .../Models/ComputeInstanceLastOperation.cs | 38 + ...ComputeInstanceProperties.Serialization.cs | 197 + .../Models/ComputeInstanceProperties.cs | 77 + ...omputeInstanceSshSettings.Serialization.cs | 73 + .../Models/ComputeInstanceSshSettings.cs | 40 + .../Generated/Models/ComputeInstanceState.cs | 90 + .../Models/ComputeJobBase.Serialization.cs | 157 + .../src/Generated/Models/ComputeJobBase.cs | 57 + .../ComputeNodesInformation.Serialization.cs | 42 + .../Models/ComputeNodesInformation.cs | 32 + .../Models/ComputeResource.Serialization.cs | 134 + .../src/Generated/Models/ComputeResource.cs | 37 + .../Models/ComputeSecrets.Serialization.cs | 38 + .../src/Generated/Models/ComputeSecrets.cs | 28 + .../src/Generated/Models/ComputeType.cs | 69 + .../Models/ContainerRegistry.Serialization.cs | 36 + .../src/Generated/Models/ContainerRegistry.cs | 22 + ...ContainerRegistryResponse.Serialization.cs | 40 + .../Models/ContainerRegistryResponse.cs | 27 + ...ainerResourceRequirements.Serialization.cs | 93 + .../Models/ContainerResourceRequirements.cs | 40 + .../src/Generated/Models/ContentsType.cs | 69 + ...ateEndpointVariantRequest.Serialization.cs | 80 + .../Models/CreateEndpointVariantRequest.cs | 26 + .../CreateServiceRequest.Serialization.cs | 65 + .../Generated/Models/CreateServiceRequest.cs | 38 + ...stEnvironmentImageRequest.Serialization.cs | 66 + ...teServiceRequestEnvironmentImageRequest.cs | 18 + .../CreateServiceRequestKeys.Serialization.cs | 31 + .../Models/CreateServiceRequestKeys.cs | 18 + .../src/Generated/Models/CreatedByType.cs | 57 + .../src/Generated/Models/CredentialsType.cs | 63 + .../Models/DataBinding.Serialization.cs | 67 + .../src/Generated/Models/DataBinding.cs | 36 + .../src/Generated/Models/DataBindingMode.cs | 54 + .../Models/DataContainer.Serialization.cs | 95 + .../src/Generated/Models/DataContainer.cs | 40 + .../DataContainerResource.Serialization.cs | 66 + .../Generated/Models/DataContainerResource.cs | 53 + ...esourceArmPaginatedResult.Serialization.cs | 46 + ...DataContainerResourceArmPaginatedResult.cs | 35 + .../Models/DataFactory.Serialization.cs | 132 + .../src/Generated/Models/DataFactory.cs | 37 + .../Models/DataLakeAnalytics.Serialization.cs | 148 + .../src/Generated/Models/DataLakeAnalytics.cs | 41 + ...taLakeAnalyticsProperties.Serialization.cs | 40 + .../Models/DataLakeAnalyticsProperties.cs | 28 + .../Models/DataVersion.Serialization.cs | 138 + .../src/Generated/Models/DataVersion.cs | 53 + .../DataVersionResource.Serialization.cs | 66 + .../Generated/Models/DataVersionResource.cs | 54 + ...esourceArmPaginatedResult.Serialization.cs | 46 + .../DataVersionResourceArmPaginatedResult.cs | 35 + .../Models/Databricks.Serialization.cs | 148 + .../src/Generated/Models/Databricks.cs | 41 + .../DatabricksComputeSecrets.Serialization.cs | 35 + .../Models/DatabricksComputeSecrets.cs | 31 + .../DatabricksProperties.Serialization.cs | 40 + .../Generated/Models/DatabricksProperties.cs | 28 + .../Models/DatasetReference.Serialization.cs | 51 + .../src/Generated/Models/DatasetReference.cs | 32 + .../src/Generated/Models/DatasetType.cs | 51 + .../Models/DatastoreContents.Serialization.cs | 133 + .../src/Generated/Models/DatastoreContents.cs | 48 + .../DatastoreCredentials.Serialization.cs | 117 + .../Generated/Models/DatastoreCredentials.cs | 45 + .../DatastoreProperties.Serialization.cs | 146 + .../Generated/Models/DatastoreProperties.cs | 64 + ...tastorePropertiesResource.Serialization.cs | 66 + .../Models/DatastorePropertiesResource.cs | 53 + ...esourceArmPaginatedResult.Serialization.cs | 46 + ...orePropertiesResourceArmPaginatedResult.cs | 35 + .../src/Generated/Models/DeploymentType.cs | 54 + ...DistributionConfiguration.Serialization.cs | 37 + .../Models/DistributionConfiguration.cs | 28 + .../src/Generated/Models/DistributionType.cs | 54 + .../DockerSpecification.Serialization.cs | 37 + .../Generated/Models/DockerSpecification.cs | 28 + .../Models/DockerSpecificationType.cs | 51 + ...nationPolicyConfiguration.Serialization.cs | 69 + .../EarlyTerminationPolicyConfiguration.cs | 34 + .../Models/EarlyTerminationPolicyType.cs | 54 + .../EncryptionProperties.Serialization.cs | 53 + .../Generated/Models/EncryptionProperties.cs | 47 + .../EncryptionProperty.Serialization.cs | 45 + .../Generated/Models/EncryptionProperty.cs | 35 + .../src/Generated/Models/EncryptionStatus.cs | 51 + .../EnvironmentContainer.Serialization.cs | 95 + .../Generated/Models/EnvironmentContainer.cs | 40 + ...ironmentContainerResource.Serialization.cs | 66 + .../Models/EnvironmentContainerResource.cs | 53 + ...esourceArmPaginatedResult.Serialization.cs | 46 + ...mentContainerResourceArmPaginatedResult.cs | 35 + .../EnvironmentImageRequest.Serialization.cs | 66 + .../Models/EnvironmentImageRequest.cs | 37 + ...ntImageRequestEnvironment.Serialization.cs | 67 + .../EnvironmentImageRequestEnvironment.cs | 18 + ...questEnvironmentReference.Serialization.cs | 51 + ...ronmentImageRequestEnvironmentReference.cs | 25 + .../EnvironmentImageResponse.Serialization.cs | 151 + .../Models/EnvironmentImageResponse.cs | 54 + ...tImageResponseEnvironment.Serialization.cs | 154 + .../EnvironmentImageResponseEnvironment.cs | 33 + ...ponseEnvironmentReference.Serialization.cs | 51 + ...onmentImageResponseEnvironmentReference.cs | 25 + .../EnvironmentReference.Serialization.cs | 51 + .../Generated/Models/EnvironmentReference.cs | 32 + .../Models/EnvironmentSpecificationType.cs | 55 + ...nmentSpecificationVersion.Serialization.cs | 160 + .../Models/EnvironmentSpecificationVersion.cs | 85 + ...cificationVersionResource.Serialization.cs | 66 + ...EnvironmentSpecificationVersionResource.cs | 78 + ...esourceArmPaginatedResult.Serialization.cs | 46 + ...cationVersionResourceArmPaginatedResult.cs | 35 + .../Models/ErrorDetail.Serialization.cs | 35 + .../src/Generated/Models/ErrorDetail.cs | 39 + .../Models/ErrorResponse.Serialization.cs | 52 + .../src/Generated/Models/ErrorResponse.cs | 40 + .../Models/EstimatedVMPrice.Serialization.cs | 41 + .../src/Generated/Models/EstimatedVMPrice.cs | 31 + .../Models/EstimatedVMPrices.Serialization.cs | 47 + .../src/Generated/Models/EstimatedVMPrices.cs | 52 + .../EvaluationConfiguration.Serialization.cs | 45 + .../Models/EvaluationConfiguration.cs | 34 + .../src/Generated/Models/ExportFormatType.cs | 54 + .../Models/ExportSummary.Serialization.cs | 91 + .../src/Generated/Models/ExportSummary.cs | 54 + .../ExportSummaryResource.Serialization.cs | 58 + .../Generated/Models/ExportSummaryResource.cs | 53 + .../Models/GlusterFsSection.Serialization.cs | 45 + .../src/Generated/Models/GlusterFsSection.cs | 39 + .../Models/HDInsight.Serialization.cs | 148 + .../src/Generated/Models/HDInsight.cs | 41 + .../HDInsightProperties.Serialization.cs | 72 + .../Generated/Models/HDInsightProperties.cs | 36 + .../Models/Identity.Serialization.cs | 85 + .../src/Generated/Models/Identity.cs | 44 + .../Models/ImageAsset.Serialization.cs | 78 + .../src/Generated/Models/ImageAsset.cs | 40 + .../Generated/Models/InnerErrorResponse.cs | 21 + .../Generated/Models/JobBase.Serialization.cs | 124 + .../src/Generated/Models/JobBase.cs | 57 + ...bBaseInteractionEndpoints.Serialization.cs | 89 + .../Models/JobBaseInteractionEndpoints.cs | 52 + .../Models/JobBaseResource.Serialization.cs | 66 + .../src/Generated/Models/JobBaseResource.cs | 54 + ...esourceArmPaginatedResult.Serialization.cs | 46 + .../JobBaseResourceArmPaginatedResult.cs | 35 + .../Models/JobOutput.Serialization.cs | 41 + .../src/Generated/Models/JobOutput.cs | 32 + .../src/Generated/Models/JobStatus.cs | 84 + .../src/Generated/Models/JobType.cs | 63 + .../KeyVaultProperties.Serialization.cs | 56 + .../Generated/Models/KeyVaultProperties.cs | 52 + .../Models/LabelCategory.Serialization.cs | 84 + .../src/Generated/Models/LabelCategory.cs | 40 + .../Models/LabelClass.Serialization.cs | 68 + .../src/Generated/Models/LabelClass.cs | 36 + .../src/Generated/Models/LabelExportState.cs | 57 + ...elingDatasetConfiguration.Serialization.cs | 67 + .../Models/LabelingDatasetConfiguration.cs | 36 + .../Models/LabelingJob.Serialization.cs | 296 ++ .../src/Generated/Models/LabelingJob.cs | 81 + .../LabelingJobInstructions.Serialization.cs | 40 + .../Models/LabelingJobInstructions.cs | 28 + ...abelingJobMediaProperties.Serialization.cs | 37 + .../Models/LabelingJobMediaProperties.cs | 28 + .../LabelingJobResource.Serialization.cs | 66 + .../Generated/Models/LabelingJobResource.cs | 54 + ...esourceArmPaginatedResult.Serialization.cs | 46 + .../LabelingJobResourceArmPaginatedResult.cs | 35 + .../Models/LinkedInfo.Serialization.cs | 67 + .../src/Generated/Models/LinkedInfo.cs | 36 + .../Models/LinkedServiceList.Serialization.cs | 40 + .../src/Generated/Models/LinkedServiceList.cs | 32 + .../LinkedServiceProps.Serialization.cs | 81 + .../Generated/Models/LinkedServiceProps.cs | 51 + .../LinkedServiceRequest.Serialization.cs | 41 + .../Generated/Models/LinkedServiceRequest.cs | 27 + .../LinkedServiceResponse.Serialization.cs | 69 + .../Generated/Models/LinkedServiceResponse.cs | 48 + .../ListAmlUserFeatureResult.Serialization.cs | 46 + .../Models/ListAmlUserFeatureResult.cs | 36 + .../ListNotebookKeysResult.Serialization.cs | 35 + .../Models/ListNotebookKeysResult.cs | 30 + .../Models/ListUsagesResult.Serialization.cs | 46 + .../src/Generated/Models/ListUsagesResult.cs | 36 + .../ListWorkspaceKeysResult.Serialization.cs | 52 + .../Models/ListWorkspaceKeysResult.cs | 36 + .../ListWorkspaceQuotas.Serialization.cs | 46 + .../Generated/Models/ListWorkspaceQuotas.cs | 36 + ...LivenessProbeRequirements.Serialization.cs | 109 + .../Models/LivenessProbeRequirements.cs | 44 + .../MLAssistConfiguration.Serialization.cs | 77 + .../Generated/Models/MLAssistConfiguration.cs | 36 + ...chineLearningServiceError.Serialization.cs | 34 + .../Models/MachineLearningServiceError.cs | 28 + .../src/Generated/Models/MediaType.cs | 51 + .../Generated/Models/Model.Serialization.cs | 340 ++ .../src/Generated/Models/Model.cs | 136 + .../Models/ModelContainer.Serialization.cs | 121 + .../src/Generated/Models/ModelContainer.cs | 46 + .../ModelContainerResource.Serialization.cs | 66 + .../Models/ModelContainerResource.cs | 53 + ...esourceArmPaginatedResult.Serialization.cs | 46 + ...odelContainerResourceArmPaginatedResult.cs | 35 + .../ModelDataCollection.Serialization.cs | 61 + .../Generated/Models/ModelDataCollection.cs | 32 + .../ModelDockerSection.Serialization.cs | 36 + .../Generated/Models/ModelDockerSection.cs | 25 + ...rSectionBaseImageRegistry.Serialization.cs | 36 + .../ModelDockerSectionBaseImageRegistry.cs | 18 + ...odelDockerSectionResponse.Serialization.cs | 67 + .../Models/ModelDockerSectionResponse.cs | 36 + ...ResponseBaseImageRegistry.Serialization.cs | 40 + ...lDockerSectionResponseBaseImageRegistry.cs | 24 + ...odelEnvironmentDefinition.Serialization.cs | 67 + .../Models/ModelEnvironmentDefinition.cs | 39 + ...vironmentDefinitionDocker.Serialization.cs | 36 + .../ModelEnvironmentDefinitionDocker.cs | 18 + ...vironmentDefinitionPython.Serialization.cs | 83 + .../ModelEnvironmentDefinitionPython.cs | 27 + ...delEnvironmentDefinitionR.Serialization.cs | 81 + .../Models/ModelEnvironmentDefinitionR.cs | 18 + ...ronmentDefinitionResponse.Serialization.cs | 154 + .../ModelEnvironmentDefinitionResponse.cs | 60 + ...tDefinitionResponseDocker.Serialization.cs | 67 + ...odelEnvironmentDefinitionResponseDocker.cs | 26 + ...tDefinitionResponsePython.Serialization.cs | 83 + ...odelEnvironmentDefinitionResponsePython.cs | 27 + ...onmentDefinitionResponseR.Serialization.cs | 183 + .../ModelEnvironmentDefinitionResponseR.cs | 37 + ...ntDefinitionResponseSpark.Serialization.cs | 98 + ...ModelEnvironmentDefinitionResponseSpark.cs | 28 + ...nvironmentDefinitionSpark.Serialization.cs | 98 + .../Models/ModelEnvironmentDefinitionSpark.cs | 28 + .../ModelPythonSection.Serialization.cs | 83 + .../Generated/Models/ModelPythonSection.cs | 39 + .../Models/ModelSparkSection.Serialization.cs | 98 + .../src/Generated/Models/ModelSparkSection.cs | 41 + .../Models/ModelVersion.Serialization.cs | 133 + .../src/Generated/Models/ModelVersion.cs | 53 + .../ModelVersionResource.Serialization.cs | 66 + .../Generated/Models/ModelVersionResource.cs | 54 + ...esourceArmPaginatedResult.Serialization.cs | 46 + .../ModelVersionResourceArmPaginatedResult.cs | 35 + .../src/Generated/Models/NodeState.cs | 63 + .../Models/NodeStateCounts.Serialization.cs | 89 + .../src/Generated/Models/NodeStateCounts.cs | 48 + .../Models/NotebookListCredentialsResult.cs | 21 + .../NotebookPreparationError.Serialization.cs | 40 + .../Models/NotebookPreparationError.cs | 30 + .../NotebookResourceInfo.Serialization.cs | 46 + .../Generated/Models/NotebookResourceInfo.cs | 35 + .../Models/Operation.Serialization.cs | 40 + .../src/Generated/Models/Operation.cs | 32 + .../Models/OperationDisplay.Serialization.cs | 47 + .../src/Generated/Models/OperationDisplay.cs | 40 + .../OperationListResult.Serialization.cs | 40 + .../Generated/Models/OperationListResult.cs | 32 + .../src/Generated/Models/OperationName.cs | 63 + .../src/Generated/Models/OperationStatus.cs | 69 + .../src/Generated/Models/OrderString.cs | 57 + .../src/Generated/Models/OriginType.cs | 48 + .../src/Generated/Models/OsType.cs | 51 + ...natedComputeResourcesList.Serialization.cs | 46 + .../Models/PaginatedComputeResourcesList.cs | 36 + .../PaginatedServiceList.Serialization.cs | 46 + .../Generated/Models/PaginatedServiceList.cs | 36 + ...dWorkspaceConnectionsList.Serialization.cs | 46 + .../PaginatedWorkspaceConnectionsList.cs | 36 + ...eterSamplingConfiguration.Serialization.cs | 45 + .../Models/ParameterSamplingConfiguration.cs | 35 + .../Generated/Models/ParameterSamplingType.cs | 54 + .../Models/Password.Serialization.cs | 35 + .../src/Generated/Models/Password.cs | 30 + ...alComputeInstanceSettings.Serialization.cs | 45 + .../Models/PersonalComputeInstanceSettings.cs | 28 + .../src/Generated/Models/PrimaryMetricGoal.cs | 51 + .../Models/PrivateEndpoint.Serialization.cs | 35 + .../src/Generated/Models/PrivateEndpoint.cs | 28 + ...PrivateEndpointConnection.Serialization.cs | 176 + .../Models/PrivateEndpointConnection.cs | 45 + ...vateEndpointConnectionProvisioningState.cs | 57 + .../PrivateEndpointServiceConnectionStatus.cs | 60 + .../PrivateLinkResource.Serialization.cs | 181 + .../Generated/Models/PrivateLinkResource.cs | 48 + ...ateLinkResourceListResult.Serialization.cs | 40 + .../Models/PrivateLinkResourceListResult.cs | 32 + ...inkServiceConnectionState.Serialization.cs | 67 + .../PrivateLinkServiceConnectionState.cs | 36 + .../Models/ProgressMetrics.Serialization.cs | 74 + .../src/Generated/Models/ProgressMetrics.cs | 42 + .../src/Generated/Models/ProvisioningState.cs | 66 + .../QuotaBaseProperties.Serialization.cs | 41 + .../Generated/Models/QuotaBaseProperties.cs | 27 + .../src/Generated/Models/QuotaUnit.cs | 48 + .../QuotaUpdateParameters.Serialization.cs | 36 + .../Generated/Models/QuotaUpdateParameters.cs | 27 + .../Models/RCranPackage.Serialization.cs | 51 + .../src/Generated/Models/RCranPackage.cs | 32 + .../Models/RGitHubPackage.Serialization.cs | 31 + .../src/Generated/Models/RGitHubPackage.cs | 23 + .../RGitHubPackageResponse.Serialization.cs | 40 + .../Models/RGitHubPackageResponse.cs | 28 + .../Models/RSection.Serialization.cs | 81 + .../src/Generated/Models/RSection.cs | 46 + .../Models/RSectionResponse.Serialization.cs | 183 + .../src/Generated/Models/RSectionResponse.cs | 71 + .../src/Generated/Models/ReasonCode.cs | 54 + ...stryListCredentialsResult.Serialization.cs | 52 + .../Models/RegistryListCredentialsResult.cs | 37 + .../Models/RemoteLoginPortPublicAccess.cs | 54 + .../Models/Resource.Serialization.cs | 118 + .../src/Generated/Models/Resource.cs | 56 + .../Models/ResourceId.Serialization.cs | 37 + .../src/Generated/Models/ResourceId.cs | 31 + .../ResourceIdentityType.Serialization.cs | 32 + .../Generated/Models/ResourceIdentityType.cs | 22 + .../Models/ResourceName.Serialization.cs | 35 + .../src/Generated/Models/ResourceName.cs | 32 + .../Models/ResourceQuota.Serialization.cs | 74 + .../src/Generated/Models/ResourceQuota.cs | 48 + .../ResourceSkuLocationInfo.Serialization.cs | 62 + .../Models/ResourceSkuLocationInfo.cs | 41 + .../ResourceSkuZoneDetails.Serialization.cs | 56 + .../Models/ResourceSkuZoneDetails.cs | 37 + .../Models/Restriction.Serialization.cs | 57 + .../src/Generated/Models/Restriction.cs | 40 + .../src/Generated/Models/RootError.cs | 35 + .../Models/SKUCapability.Serialization.cs | 35 + .../src/Generated/Models/SKUCapability.cs | 32 + .../Models/SasSection.Serialization.cs | 40 + .../src/Generated/Models/SasSection.cs | 28 + .../Models/ScaleSettings.Serialization.cs | 70 + .../src/Generated/Models/ScaleSettings.cs | 40 + .../Models/ServicePrincipalCredentials.cs | 39 + .../ServicePrincipalSection.Serialization.cs | 79 + .../Models/ServicePrincipalSection.cs | 50 + .../Models/ServiceResource.Serialization.cs | 134 + .../src/Generated/Models/ServiceResource.cs | 37 + .../ServiceResponseBase.Serialization.cs | 150 + .../Generated/Models/ServiceResponseBase.cs | 57 + .../ServiceResponseBaseError.Serialization.cs | 52 + .../Models/ServiceResponseBaseError.cs | 28 + ...SharedPrivateLinkResource.Serialization.cs | 104 + .../Models/SharedPrivateLinkResource.cs | 44 + .../src/Generated/Models/Sku.Serialization.cs | 51 + .../src/Generated/Models/Sku.cs | 32 + .../Models/SkuListResult.Serialization.cs | 46 + .../src/Generated/Models/SkuListResult.cs | 35 + .../Models/SparkMavenPackage.Serialization.cs | 62 + .../src/Generated/Models/SparkMavenPackage.cs | 33 + .../Models/SqlAdminSection.Serialization.cs | 48 + .../src/Generated/Models/SqlAdminSection.cs | 42 + .../src/Generated/Models/SshPublicAccess.cs | 51 + .../Models/SslConfiguration.Serialization.cs | 78 + .../src/Generated/Models/SslConfiguration.cs | 40 + .../Models/SslConfigurationStatus.cs | 51 + .../src/Generated/Models/Status.cs | 69 + .../Models/StatusMessage.Serialization.cs | 64 + .../src/Generated/Models/StatusMessage.cs | 42 + .../Generated/Models/StatusMessageLevel.cs | 54 + .../Models/SweepJob.Serialization.cs | 213 ++ .../src/Generated/Models/SweepJob.cs | 77 + .../Models/SystemData.Serialization.cs | 80 + .../src/Generated/Models/SystemData.cs | 50 + .../Models/SystemService.Serialization.cs | 41 + .../src/Generated/Models/SystemService.cs | 36 + .../TerminationConfiguration.Serialization.cs | 93 + .../Models/TerminationConfiguration.cs | 37 + .../Models/TrialComponent.Serialization.cs | 100 + .../src/Generated/Models/TrialComponent.cs | 42 + .../Models/UnderlyingResourceAction.cs | 51 + .../src/Generated/Models/UnitOfMeasure.cs | 48 + .../UpdateWorkspaceQuotas.Serialization.cs | 68 + .../Generated/Models/UpdateWorkspaceQuotas.cs | 44 + ...dateWorkspaceQuotasResult.Serialization.cs | 46 + .../Models/UpdateWorkspaceQuotasResult.cs | 36 + .../Generated/Models/Usage.Serialization.cs | 85 + .../src/Generated/Models/Usage.cs | 52 + .../Models/UsageName.Serialization.cs | 35 + .../src/Generated/Models/UsageName.cs | 32 + .../src/Generated/Models/UsageUnit.cs | 48 + .../UserAccountCredentials.Serialization.cs | 59 + .../Models/UserAccountCredentials.cs | 46 + .../UserAssignedIdentity.Serialization.cs | 47 + .../Generated/Models/UserAssignedIdentity.cs | 36 + .../src/Generated/Models/VMPriceOSType.cs | 51 + .../src/Generated/Models/VMTier.cs | 54 + .../src/Generated/Models/VariantType.cs | 51 + .../Models/VirtualMachine.Serialization.cs | 148 + .../src/Generated/Models/VirtualMachine.cs | 41 + .../VirtualMachineImage.Serialization.cs | 37 + .../Generated/Models/VirtualMachineImage.cs | 31 + .../VirtualMachineProperties.Serialization.cs | 83 + .../Models/VirtualMachineProperties.cs | 40 + .../VirtualMachineSecrets.Serialization.cs | 40 + .../Generated/Models/VirtualMachineSecrets.cs | 31 + .../VirtualMachineSize.Serialization.cs | 123 + .../Generated/Models/VirtualMachineSize.cs | 64 + ...tualMachineSizeListResult.Serialization.cs | 40 + .../Models/VirtualMachineSizeListResult.cs | 32 + ...tualMachineSshCredentials.Serialization.cs | 73 + .../Models/VirtualMachineSshCredentials.cs | 40 + .../src/Generated/Models/VmPriority.cs | 51 + .../Models/VnetConfiguration.Serialization.cs | 51 + .../src/Generated/Models/VnetConfiguration.cs | 32 + .../src/Generated/Models/WebServiceState.cs | 60 + .../Models/Workspace.Serialization.cs | 357 ++ .../src/Generated/Models/Workspace.cs | 109 + .../WorkspaceConnection.Serialization.cs | 77 + .../Generated/Models/WorkspaceConnection.cs | 52 + .../WorkspaceConnectionDto.Serialization.cs | 49 + .../Models/WorkspaceConnectionDto.cs | 29 + .../WorkspaceListResult.Serialization.cs | 46 + .../Generated/Models/WorkspaceListResult.cs | 36 + .../Models/WorkspaceSku.Serialization.cs | 106 + .../src/Generated/Models/WorkspaceSku.cs | 57 + ...WorkspaceUpdateParameters.Serialization.cs | 50 + .../Models/WorkspaceUpdateParameters.cs | 31 + .../src/Generated/NotebooksOperations.cs | 134 + .../Generated/NotebooksPrepareOperation.cs | 65 + .../src/Generated/NotebooksRestOperations.cs | 209 ++ .../src/Generated/Operations.cs | 84 + .../PrivateEndpointConnectionsOperations.cs | 162 + ...rivateEndpointConnectionsRestOperations.cs | 344 ++ .../PrivateLinkResourcesOperations.cs | 78 + .../PrivateLinkResourcesRestOperations.cs | 137 + .../src/Generated/QuotasOperations.cs | 167 + .../src/Generated/QuotasRestOperations.cs | 288 ++ .../src/Generated/RestOperations.cs | 100 + .../src/Generated/UsagesOperations.cs | 129 + .../src/Generated/UsagesRestOperations.cs | 202 ++ .../VirtualMachineSizesOperations.cs | 76 + .../VirtualMachineSizesRestOperations.cs | 125 + .../WorkspaceConnectionsOperations.cs | 235 ++ .../WorkspaceConnectionsRestOperations.cs | 440 +++ .../Generated/WorkspaceFeaturesOperations.cs | 139 + .../WorkspaceFeaturesRestOperations.cs | 224 ++ .../WorkspacesCreateOrUpdateOperation.cs | 66 + .../Generated/WorkspacesDeleteOperation.cs | 62 + .../src/Generated/WorkspacesOperations.cs | 491 +++ .../src/Generated/WorkspacesRestOperations.cs | 847 +++++ .../src/autorest.md | 13 + ...nager.MachineLearningServices.Tests.csproj | 10 + sdk/machinelearningservices/ci.yml | 2 - .../test-resources.json | 6 + sdk/machinelearningservices/tests.yml | 1 - 614 files changed, 54799 insertions(+), 3 deletions(-) create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/Azure.ResourceManager.MachineLearningServices.sln create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/CHANGELOG.md create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/Directory.Build.props create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/README.md create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/api/Azure.ResourceManager.MachineLearningServices.netstandard2.0.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Azure.ResourceManager.MachineLearningServices.csproj create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateHeaders.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateOperation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteHeaders.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteOperation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeUpdateOperation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateHeaders.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateOperation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClient.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClientOptions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecrets.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecrets.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksNetworkingConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksNetworkingConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AllocationState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodeInformation.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodeInformation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlUserFeature.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlUserFeature.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ApplicationSharingPolicy.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssignedUser.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssignedUser.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/BillingCurrency.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeEnvironmentType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceApplication.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceApplication.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceAuthorizationType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceConnectivityEndpoints.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceConnectivityEndpoints.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceCreatedBy.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceCreatedBy.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceLastOperation.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceLastOperation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceSshSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceSshSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeSecrets.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeSecrets.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContentsType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreatedByType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CredentialsType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBindingMode.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalyticsProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalyticsProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecrets.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecrets.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DeploymentType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecificationType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrice.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrice.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrices.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrices.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportFormatType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Identity.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Identity.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InnerErrorResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KeyVaultProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KeyVaultProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelExportState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListAmlUserFeatureResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListAmlUserFeatureResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListNotebookKeysResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListNotebookKeysResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListUsagesResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListUsagesResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceQuotas.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceQuotas.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MediaType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeStateCounts.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeStateCounts.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookListCredentialsResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookPreparationError.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookPreparationError.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Operation.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Operation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationDisplay.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationDisplay.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationListResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationListResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationName.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OrderString.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OriginType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OsType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedComputeResourcesList.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedComputeResourcesList.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedWorkspaceConnectionsList.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedWorkspaceConnectionsList.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Password.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Password.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PersonalComputeInstanceSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PersonalComputeInstanceSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrimaryMetricGoal.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResourceListResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResourceListResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkServiceConnectionState.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkServiceConnectionState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaBaseProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaBaseProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUnit.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUpdateParameters.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUpdateParameters.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ReasonCode.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RegistryListCredentialsResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RegistryListCredentialsResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RemoteLoginPortPublicAccess.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceId.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceId.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceIdentityType.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceIdentityType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceName.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceName.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceQuota.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceQuota.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuLocationInfo.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuZoneDetails.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Restriction.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Restriction.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RootError.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SKUCapability.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SKUCapability.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettings.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettings.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalCredentials.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SharedPrivateLinkResource.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SharedPrivateLinkResource.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Sku.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Sku.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SkuListResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SkuListResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SshPublicAccess.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfigurationStatus.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Status.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessageLevel.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemService.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemService.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UnderlyingResourceAction.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UnitOfMeasure.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotas.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotas.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotasResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotasResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Usage.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Usage.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageName.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageName.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageUnit.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAccountCredentials.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAccountCredentials.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAssignedIdentity.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAssignedIdentity.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VMPriceOSType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VMTier.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VariantType.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineImage.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineImage.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSecrets.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSecrets.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSshCredentials.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSshCredentials.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VmPriority.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WebServiceState.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceListResult.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceListResult.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceSku.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceSku.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.Serialization.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksPrepareOperation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Operations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/RestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesCreateOrUpdateOperation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDeleteOperation.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesRestOperations.cs create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/autorest.md create mode 100644 sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/tests/Azure.ResourceManager.MachineLearningServices.Tests.csproj create mode 100644 sdk/machinelearningservices/test-resources.json diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/Azure.ResourceManager.MachineLearningServices.sln b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/Azure.ResourceManager.MachineLearningServices.sln new file mode 100644 index 000000000000..1490a0684215 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/Azure.ResourceManager.MachineLearningServices.sln @@ -0,0 +1,79 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.MachineLearningServices", "src\Azure.ResourceManager.MachineLearningServices.csproj", "{E33D09D9-D809-472C-82E6-6A26BDB86FC2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Compute.Tests", "tests\Azure.ResourceManager.MachineLearningServices.Tests.csproj", "{738C0769-57F8-439C-8078-54498A030BA0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core", "..\..\core\Azure.Core\src\Azure.Core.csproj", "{EF7D6C71-0600-4A71-BEC9-297DAF6C7966}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{8052009B-2126-44A3-88CD-4F3B17894C64}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Debug|x64.ActiveCfg = Debug|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Debug|x64.Build.0 = Debug|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Debug|x86.ActiveCfg = Debug|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Debug|x86.Build.0 = Debug|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Release|Any CPU.Build.0 = Release|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Release|x64.ActiveCfg = Release|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Release|x64.Build.0 = Release|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Release|x86.ActiveCfg = Release|Any CPU + {E33D09D9-D809-472C-82E6-6A26BDB86FC2}.Release|x86.Build.0 = Release|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Debug|x64.ActiveCfg = Debug|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Debug|x64.Build.0 = Debug|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Debug|x86.ActiveCfg = Debug|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Debug|x86.Build.0 = Debug|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Release|Any CPU.Build.0 = Release|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Release|x64.ActiveCfg = Release|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Release|x64.Build.0 = Release|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Release|x86.ActiveCfg = Release|Any CPU + {8052009B-2126-44A3-88CD-4F3B17894C64}.Release|x86.Build.0 = Release|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Debug|x64.ActiveCfg = Debug|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Debug|x64.Build.0 = Debug|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Debug|x86.ActiveCfg = Debug|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Debug|x86.Build.0 = Debug|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Release|Any CPU.Build.0 = Release|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Release|x64.ActiveCfg = Release|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Release|x64.Build.0 = Release|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Release|x86.ActiveCfg = Release|Any CPU + {EF7D6C71-0600-4A71-BEC9-297DAF6C7966}.Release|x86.Build.0 = Release|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Debug|x64.ActiveCfg = Debug|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Debug|x64.Build.0 = Debug|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Debug|x86.ActiveCfg = Debug|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Debug|x86.Build.0 = Debug|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Release|Any CPU.Build.0 = Release|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Release|x64.ActiveCfg = Release|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Release|x64.Build.0 = Release|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Release|x86.ActiveCfg = Release|Any CPU + {738C0769-57F8-439C-8078-54498A030BA0}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/CHANGELOG.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/CHANGELOG.md new file mode 100644 index 000000000000..42cd2e2ce46b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/CHANGELOG.md @@ -0,0 +1,6 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +Azure management client SDK for Azure resource provider MachineLearningServices. +This is the first beta preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/Directory.Build.props b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/README.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/README.md new file mode 100644 index 000000000000..d7d8f2af6163 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/README.md @@ -0,0 +1,77 @@ +# Azure MachineLearningServices Management client library for .NET + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html) which provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more. + +## Getting started + +### Install the package + +Install the Azure MachineLearningServices management library for .NET with [NuGet](https://www.nuget.org/): + +```PowerShell +Install-Package Azure.ResourceManager.MachineLearningServices -Version 1.0.0-preview.1 +``` + +### Prerequisites + +* You must have an [Azure subscription](https://azure.microsoft.com/free/) + +### Authenticate the Client + +To create an authenticated client and start interacting with Azure resources, please see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/master/doc/mgmt_preview_quickstart.md) + +## Key concepts + +Key concepts of the Azure .NET SDK can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/master/doc/mgmt_preview_quickstart.md) +- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet) +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/identity/Azure.Identity/README.md) + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://docs.microsoft.com/samples/browse/?branch=master&languages=csharp&term=managing%20using%20Azure%20.NET%20SDK) + +## Troubleshooting + +- File an issue via [Github + Issues](https://github.com/Azure/azure-sdk-for-net/issues) +- Check [previous + questions](https://stackoverflow.com/questions/tagged/azure+.net) + or ask new ones on Stack Overflow using azure and .net tags. + + +## Next steps + +For more information on Azure SDK, please refer to [this website](https://azure.github.io/azure-sdk/) + +## Contributing + +For details on contributing to this repository, see the contributing +guide. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(e.g., label, comment). Simply follow the instructions provided by the +bot. You will only need to do this once across all repositories using +our CLA. + +This project has adopted the Microsoft Open Source Code of Conduct. For +more information see the Code of Conduct FAQ or contact + with any additional questions or comments. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://worldready.cloudapp.net/Styleguide/Read?id=2696&topicid=25357 + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Ftemplate%2FAzure.Template%2FREADME.png) \ No newline at end of file diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/api/Azure.ResourceManager.MachineLearningServices.netstandard2.0.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/api/Azure.ResourceManager.MachineLearningServices.netstandard2.0.cs new file mode 100644 index 000000000000..195abfdf935c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/api/Azure.ResourceManager.MachineLearningServices.netstandard2.0.cs @@ -0,0 +1,3166 @@ +namespace Azure.ResourceManager.MachineLearningServices +{ + public partial class AzureMachineLearningWorkspacesOperations + { + protected AzureMachineLearningWorkspacesOperations() { } + public virtual Azure.Pageable ListSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class CodeContainersOperations + { + protected CodeContainersOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.CodeContainerResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.CodeContainerResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class CodeVersionsOperations + { + protected CodeVersionsOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.CodeVersionResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.CodeVersionResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataContainersOperations + { + protected DataContainersOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.DataContainerResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.DataContainerResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DatastoresOperations + { + protected DatastoresOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.DatastorePropertiesResource body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.DatastorePropertiesResource body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = default(int?), bool? isDefault = default(bool?), System.Collections.Generic.IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = default(int?), bool? isDefault = default(bool?), System.Collections.Generic.IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListSecrets(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListSecretsAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataVersionsOperations + { + protected DataVersionsOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.DataVersionResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.DataVersionResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EnvironmentContainersOperations + { + protected EnvironmentContainersOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.EnvironmentContainerResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.EnvironmentContainerResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EnvironmentSpecificationVersionsOperations + { + protected EnvironmentSpecificationVersionsOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationVersionResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationVersionResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class JobsOperations + { + protected JobsOperations() { } + public virtual Azure.Response Cancel(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.JobBaseResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.JobBaseResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Poll(string id, string operationId, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task PollAsync(string id, string operationId, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class LabelingJobsOperations + { + protected LabelingJobsOperations() { } + public virtual Azure.Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.LabelingJobResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.LabelingJobResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExportLabels(string id, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType? body = default(Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ExportLabelsAsync(string id, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType? body = default(Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = default(bool?), bool? includeLabelCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetExportSummary(string id, System.Guid exportId, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetExportSummaryAsync(string id, System.Guid exportId, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Pause(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task PauseAsync(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Resume(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ResumeAsync(string id, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class LinkedServicesOperations + { + protected LinkedServicesOperations() { } + public virtual Azure.Response Create(string resourceGroupName, string workspaceName, string linkName, Azure.ResourceManager.MachineLearningServices.Models.LinkedServiceRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(string resourceGroupName, string workspaceName, string linkName, Azure.ResourceManager.MachineLearningServices.Models.LinkedServiceRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string resourceGroupName, string workspaceName, string linkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string resourceGroupName, string workspaceName, string linkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string resourceGroupName, string workspaceName, string linkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, string workspaceName, string linkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response List(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningComputeCreateOrUpdateOperation : Azure.Operation + { + internal MachineLearningComputeCreateOrUpdateOperation() { } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.ResourceManager.MachineLearningServices.Models.ComputeResource Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningComputeDeleteOperation : Azure.Operation + { + internal MachineLearningComputeDeleteOperation() { } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.Response Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningComputeOperations + { + protected MachineLearningComputeOperations() { } + public virtual Azure.Response Get(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListKeys(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListKeysAsync(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListNodes(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListNodesAsync(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Restart(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RestartAsync(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Start(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartAsync(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearningServices.MachineLearningComputeCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, string computeName, Azure.ResourceManager.MachineLearningServices.Models.ComputeResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, string computeName, Azure.ResourceManager.MachineLearningServices.Models.ComputeResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearningServices.MachineLearningComputeDeleteOperation StartDelete(string resourceGroupName, string workspaceName, string computeName, Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction underlyingResourceAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartDeleteAsync(string resourceGroupName, string workspaceName, string computeName, Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction underlyingResourceAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearningServices.MachineLearningComputeUpdateOperation StartUpdate(string resourceGroupName, string workspaceName, string computeName, Azure.ResourceManager.MachineLearningServices.Models.ClusterUpdateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartUpdateAsync(string resourceGroupName, string workspaceName, string computeName, Azure.ResourceManager.MachineLearningServices.Models.ClusterUpdateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Stop(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(string resourceGroupName, string workspaceName, string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningComputeUpdateOperation : Azure.Operation + { + internal MachineLearningComputeUpdateOperation() { } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.ResourceManager.MachineLearningServices.Models.ComputeResource Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningServiceCreateOrUpdateOperation : Azure.Operation + { + internal MachineLearningServiceCreateOrUpdateOperation() { } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.ResourceManager.MachineLearningServices.Models.ServiceResource Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningServiceOperations + { + protected MachineLearningServiceOperations() { } + public virtual Azure.Response Delete(string resourceGroupName, string workspaceName, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string resourceGroupName, string workspaceName, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string resourceGroupName, string workspaceName, string serviceName, bool? expand = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, string workspaceName, string serviceName, bool? expand = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = default(bool?), Azure.ResourceManager.MachineLearningServices.Models.OrderString? orderby = default(Azure.ResourceManager.MachineLearningServices.Models.OrderString?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = default(bool?), Azure.ResourceManager.MachineLearningServices.Models.OrderString? orderby = default(Azure.ResourceManager.MachineLearningServices.Models.OrderString?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearningServices.MachineLearningServiceCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, string serviceName, Azure.ResourceManager.MachineLearningServices.Models.CreateServiceRequest properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, string serviceName, Azure.ResourceManager.MachineLearningServices.Models.CreateServiceRequest properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningServicesManagementClient + { + protected MachineLearningServicesManagementClient() { } + public MachineLearningServicesManagementClient(string subscriptionId, Azure.Core.TokenCredential tokenCredential, Azure.ResourceManager.MachineLearningServices.MachineLearningServicesManagementClientOptions options = null) { } + public MachineLearningServicesManagementClient(System.Uri endpoint, string subscriptionId, Azure.Core.TokenCredential tokenCredential, Azure.ResourceManager.MachineLearningServices.MachineLearningServicesManagementClientOptions options = null) { } + public virtual Azure.ResourceManager.MachineLearningServices.AzureMachineLearningWorkspacesOperations AzureMachineLearningWorkspaces { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.CodeContainersOperations CodeContainers { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.CodeVersionsOperations CodeVersions { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.DataContainersOperations DataContainers { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.DatastoresOperations Datastores { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.DataVersionsOperations DataVersions { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.EnvironmentContainersOperations EnvironmentContainers { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.EnvironmentSpecificationVersionsOperations EnvironmentSpecificationVersions { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.JobsOperations Jobs { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.LabelingJobsOperations LabelingJobs { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.LinkedServicesOperations LinkedServices { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.MachineLearningComputeOperations MachineLearningCompute { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.MachineLearningServiceOperations MachineLearningService { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.ModelContainersOperations ModelContainers { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.ModelVersionsOperations ModelVersions { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.NotebooksOperations Notebooks { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.Operations Operations { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.PrivateEndpointConnectionsOperations PrivateEndpointConnections { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.PrivateLinkResourcesOperations PrivateLinkResources { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.QuotasOperations Quotas { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.UsagesOperations Usages { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.VirtualMachineSizesOperations VirtualMachineSizes { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.WorkspaceConnectionsOperations WorkspaceConnections { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.WorkspaceFeaturesOperations WorkspaceFeatures { get { throw null; } } + public virtual Azure.ResourceManager.MachineLearningServices.WorkspacesOperations Workspaces { get { throw null; } } + } + public partial class MachineLearningServicesManagementClientOptions : Azure.Core.ClientOptions + { + public MachineLearningServicesManagementClientOptions() { } + } + public partial class ModelContainersOperations + { + protected ModelContainersOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.ModelContainerResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.ModelContainerResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ModelVersionsOperations + { + protected ModelVersionsOperations() { } + public virtual Azure.Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.ModelVersionResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.ModelVersionResource body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = default(int?), int? offset = default(int?), string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = default(int?), int? offset = default(int?), string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NotebooksOperations + { + protected NotebooksOperations() { } + public virtual Azure.Response ListKeys(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListKeysAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearningServices.NotebooksPrepareOperation StartPrepare(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartPrepareAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NotebooksPrepareOperation : Azure.Operation + { + internal NotebooksPrepareOperation() { } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.ResourceManager.MachineLearningServices.Models.NotebookResourceInfo Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class Operations + { + protected Operations() { } + public virtual Azure.Pageable List(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PrivateEndpointConnectionsOperations + { + protected PrivateEndpointConnectionsOperations() { } + public virtual Azure.Response Delete(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Put(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnection properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PutAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnection properties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PrivateLinkResourcesOperations + { + protected PrivateLinkResourcesOperations() { } + public virtual Azure.Response ListByWorkspace(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class QuotasOperations + { + protected QuotasOperations() { } + public virtual Azure.Pageable List(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(string location, Azure.ResourceManager.MachineLearningServices.Models.QuotaUpdateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(string location, Azure.ResourceManager.MachineLearningServices.Models.QuotaUpdateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class UsagesOperations + { + protected UsagesOperations() { } + public virtual Azure.Pageable List(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class VirtualMachineSizesOperations + { + protected VirtualMachineSizesOperations() { } + public virtual Azure.Response List(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WorkspaceConnectionsOperations + { + protected WorkspaceConnectionsOperations() { } + public virtual Azure.Response Create(string resourceGroupName, string workspaceName, string connectionName, Azure.ResourceManager.MachineLearningServices.Models.WorkspaceConnectionDto parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(string resourceGroupName, string workspaceName, string connectionName, Azure.ResourceManager.MachineLearningServices.Models.WorkspaceConnectionDto parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Delete(string resourceGroupName, string workspaceName, string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string resourceGroupName, string workspaceName, string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string resourceGroupName, string workspaceName, string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, string workspaceName, string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, string target = null, string category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string target = null, string category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WorkspaceFeaturesOperations + { + protected WorkspaceFeaturesOperations() { } + public virtual Azure.Pageable List(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WorkspacesCreateOrUpdateOperation : Azure.Operation + { + internal WorkspacesCreateOrUpdateOperation() { } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.ResourceManager.MachineLearningServices.Models.Workspace Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WorkspacesDeleteOperation : Azure.Operation + { + internal WorkspacesDeleteOperation() { } + public override bool HasCompleted { get { throw null; } } + public override bool HasValue { get { throw null; } } + public override string Id { get { throw null; } } + public override Azure.Response Value { get { throw null; } } + public override Azure.Response GetRawResponse() { throw null; } + public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WorkspacesOperations + { + protected WorkspacesOperations() { } + public virtual Azure.Response Get(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable ListByResourceGroup(string resourceGroupName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListByResourceGroupAsync(string resourceGroupName, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable ListBySubscription(string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable ListBySubscriptionAsync(string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ListKeys(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ListKeysAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ResyncKeys(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ResyncKeysAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearningServices.WorkspacesCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.Workspace parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.Workspace parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearningServices.WorkspacesDeleteOperation StartDelete(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartDeleteAsync(string resourceGroupName, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.WorkspaceUpdateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(string resourceGroupName, string workspaceName, Azure.ResourceManager.MachineLearningServices.Models.WorkspaceUpdateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AccountKeySection + { + public AccountKeySection() { } + public string Key { get { throw null; } set { } } + } + public partial class ACIServiceCreateRequest : Azure.ResourceManager.MachineLearningServices.Models.CreateServiceRequest + { + public ACIServiceCreateRequest() { } + public bool? AppInsightsEnabled { get { throw null; } set { } } + public bool? AuthEnabled { get { throw null; } set { } } + public string Cname { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ContainerResourceRequirements ContainerResourceRequirements { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelDataCollection DataCollection { get { throw null; } set { } } + public string DnsNameLabel { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.EncryptionProperties EncryptionProperties { get { throw null; } set { } } + public string SslCertificate { get { throw null; } set { } } + public bool? SslEnabled { get { throw null; } set { } } + public string SslKey { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.VnetConfiguration VnetConfiguration { get { throw null; } set { } } + } + public partial class ACIServiceCreateRequestDataCollection : Azure.ResourceManager.MachineLearningServices.Models.ModelDataCollection + { + public ACIServiceCreateRequestDataCollection() { } + } + public partial class ACIServiceCreateRequestEncryptionProperties : Azure.ResourceManager.MachineLearningServices.Models.EncryptionProperties + { + public ACIServiceCreateRequestEncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) : base (default(string), default(string), default(string)) { } + } + public partial class ACIServiceCreateRequestVnetConfiguration : Azure.ResourceManager.MachineLearningServices.Models.VnetConfiguration + { + public ACIServiceCreateRequestVnetConfiguration() { } + } + public partial class ACIServiceResponse : Azure.ResourceManager.MachineLearningServices.Models.ServiceResponseBase + { + public ACIServiceResponse() { } + public bool? AppInsightsEnabled { get { throw null; } set { } } + public bool? AuthEnabled { get { throw null; } set { } } + public string Cname { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ContainerResourceRequirements ContainerResourceRequirements { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelDataCollection DataCollection { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.EncryptionProperties EncryptionProperties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.EnvironmentImageResponse EnvironmentImageRequest { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyDictionary ModelConfigMap { get { throw null; } } + public System.Collections.Generic.IList Models { get { throw null; } } + public string PublicFqdn { get { throw null; } set { } } + public string PublicIp { get { throw null; } set { } } + public string ScoringUri { get { throw null; } } + public string SslCertificate { get { throw null; } set { } } + public bool? SslEnabled { get { throw null; } set { } } + public string SslKey { get { throw null; } set { } } + public string SwaggerUri { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.VnetConfiguration VnetConfiguration { get { throw null; } set { } } + } + public partial class ACIServiceResponseDataCollection : Azure.ResourceManager.MachineLearningServices.Models.ModelDataCollection + { + public ACIServiceResponseDataCollection() { } + } + public partial class ACIServiceResponseEncryptionProperties : Azure.ResourceManager.MachineLearningServices.Models.EncryptionProperties + { + public ACIServiceResponseEncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) : base (default(string), default(string), default(string)) { } + } + public partial class ACIServiceResponseEnvironmentImageRequest : Azure.ResourceManager.MachineLearningServices.Models.EnvironmentImageResponse + { + public ACIServiceResponseEnvironmentImageRequest() { } + } + public partial class ACIServiceResponseVnetConfiguration : Azure.ResourceManager.MachineLearningServices.Models.VnetConfiguration + { + public ACIServiceResponseVnetConfiguration() { } + } + public partial class AKS : Azure.ResourceManager.MachineLearningServices.Models.Compute + { + public AKS() { } + public Azure.ResourceManager.MachineLearningServices.Models.AKSProperties Properties { get { throw null; } set { } } + } + public partial class AksComputeSecrets : Azure.ResourceManager.MachineLearningServices.Models.ComputeSecrets + { + internal AksComputeSecrets() { } + public string AdminKubeConfig { get { throw null; } } + public string ImagePullSecretName { get { throw null; } } + public string UserKubeConfig { get { throw null; } } + } + public partial class AksNetworkingConfiguration + { + public AksNetworkingConfiguration() { } + public string DnsServiceIP { get { throw null; } set { } } + public string DockerBridgeCidr { get { throw null; } set { } } + public string ServiceCidr { get { throw null; } set { } } + public string SubnetId { get { throw null; } set { } } + } + public partial class AKSProperties + { + public AKSProperties() { } + public int? AgentCount { get { throw null; } set { } } + public string AgentVMSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AksNetworkingConfiguration AksNetworkingConfiguration { get { throw null; } set { } } + public string ClusterFqdn { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SslConfiguration SslConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList SystemServices { get { throw null; } } + } + public partial class AKSReplicaStatus + { + internal AKSReplicaStatus() { } + public int? AvailableReplicas { get { throw null; } } + public int? DesiredReplicas { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ErrorResponse Error { get { throw null; } } + public int? UpdatedReplicas { get { throw null; } } + } + public partial class AKSReplicaStatusError : Azure.ResourceManager.MachineLearningServices.Models.ErrorResponse + { + internal AKSReplicaStatusError() { } + } + public partial class AKSServiceCreateRequest : Azure.ResourceManager.MachineLearningServices.Models.CreateEndpointVariantRequest + { + public AKSServiceCreateRequest() { } + public bool? AadAuthEnabled { get { throw null; } set { } } + public bool? AppInsightsEnabled { get { throw null; } set { } } + public bool? AuthEnabled { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AutoScaler AutoScaler { get { throw null; } set { } } + public string ComputeName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ContainerResourceRequirements ContainerResourceRequirements { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelDataCollection DataCollection { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.LivenessProbeRequirements LivenessProbeRequirements { get { throw null; } set { } } + public int? MaxConcurrentRequestsPerContainer { get { throw null; } set { } } + public int? MaxQueueWaitMs { get { throw null; } set { } } + public string Namespace { get { throw null; } set { } } + public int? NumReplicas { get { throw null; } set { } } + public int? ScoringTimeoutMs { get { throw null; } set { } } + } + public partial class AKSServiceCreateRequestAutoScaler : Azure.ResourceManager.MachineLearningServices.Models.AutoScaler + { + public AKSServiceCreateRequestAutoScaler() { } + } + public partial class AKSServiceCreateRequestDataCollection : Azure.ResourceManager.MachineLearningServices.Models.ModelDataCollection + { + public AKSServiceCreateRequestDataCollection() { } + } + public partial class AKSServiceCreateRequestLivenessProbeRequirements : Azure.ResourceManager.MachineLearningServices.Models.LivenessProbeRequirements + { + public AKSServiceCreateRequestLivenessProbeRequirements() { } + } + public partial class AKSServiceResponse : Azure.ResourceManager.MachineLearningServices.Models.AKSVariantResponse + { + public AKSServiceResponse() { } + public bool? AadAuthEnabled { get { throw null; } set { } } + public bool? AppInsightsEnabled { get { throw null; } set { } } + public bool? AuthEnabled { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AutoScaler AutoScaler { get { throw null; } set { } } + public string ComputeName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ContainerResourceRequirements ContainerResourceRequirements { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelDataCollection DataCollection { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AKSReplicaStatus DeploymentStatus { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.EnvironmentImageResponse EnvironmentImageRequest { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.LivenessProbeRequirements LivenessProbeRequirements { get { throw null; } set { } } + public int? MaxConcurrentRequestsPerContainer { get { throw null; } set { } } + public int? MaxQueueWaitMs { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyDictionary ModelConfigMap { get { throw null; } } + public System.Collections.Generic.IList Models { get { throw null; } } + public string Namespace { get { throw null; } set { } } + public int? NumReplicas { get { throw null; } set { } } + public int? ScoringTimeoutMs { get { throw null; } set { } } + public string ScoringUri { get { throw null; } } + public string SwaggerUri { get { throw null; } } + } + public partial class AKSServiceResponseAutoScaler : Azure.ResourceManager.MachineLearningServices.Models.AutoScaler + { + public AKSServiceResponseAutoScaler() { } + } + public partial class AKSServiceResponseDataCollection : Azure.ResourceManager.MachineLearningServices.Models.ModelDataCollection + { + public AKSServiceResponseDataCollection() { } + } + public partial class AKSServiceResponseDeploymentStatus : Azure.ResourceManager.MachineLearningServices.Models.AKSReplicaStatus + { + internal AKSServiceResponseDeploymentStatus() { } + } + public partial class AKSServiceResponseEnvironmentImageRequest : Azure.ResourceManager.MachineLearningServices.Models.EnvironmentImageResponse + { + public AKSServiceResponseEnvironmentImageRequest() { } + } + public partial class AKSServiceResponseLivenessProbeRequirements : Azure.ResourceManager.MachineLearningServices.Models.LivenessProbeRequirements + { + public AKSServiceResponseLivenessProbeRequirements() { } + } + public partial class AKSVariantResponse : Azure.ResourceManager.MachineLearningServices.Models.ServiceResponseBase + { + public AKSVariantResponse() { } + public bool? IsDefault { get { throw null; } set { } } + public float? TrafficPercentile { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.VariantType? Type { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AllocationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AllocationState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.AllocationState Resizing { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.AllocationState Steady { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.AllocationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.AllocationState left, Azure.ResourceManager.MachineLearningServices.Models.AllocationState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.AllocationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.AllocationState left, Azure.ResourceManager.MachineLearningServices.Models.AllocationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AmlCompute : Azure.ResourceManager.MachineLearningServices.Models.Compute + { + public AmlCompute() { } + public Azure.ResourceManager.MachineLearningServices.Models.AmlComputeProperties Properties { get { throw null; } set { } } + } + public partial class AmlComputeNodeInformation + { + internal AmlComputeNodeInformation() { } + public string NodeId { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.NodeState? NodeState { get { throw null; } } + public int? Port { get { throw null; } } + public string PrivateIpAddress { get { throw null; } } + public string PublicIpAddress { get { throw null; } } + public string RunId { get { throw null; } } + } + public partial class AmlComputeNodesInformation : Azure.ResourceManager.MachineLearningServices.Models.ComputeNodesInformation + { + internal AmlComputeNodesInformation() { } + public System.Collections.Generic.IReadOnlyList Nodes { get { throw null; } } + } + public partial class AmlComputeProperties + { + public AmlComputeProperties() { } + public Azure.ResourceManager.MachineLearningServices.Models.AllocationState? AllocationState { get { throw null; } } + public System.DateTimeOffset? AllocationStateTransitionTime { get { throw null; } } + public int? CurrentNodeCount { get { throw null; } } + public bool? EnableNodePublicIp { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public bool? IsolatedNetwork { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.NodeStateCounts NodeStateCounts { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.OsType? OsType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess? RemoteLoginPortPublicAccess { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ScaleSettings ScaleSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ResourceId Subnet { get { throw null; } set { } } + public int? TargetNodeCount { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.UserAccountCredentials UserAccountCredentials { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.VirtualMachineImage VirtualMachineImage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.VmPriority? VmPriority { get { throw null; } set { } } + public string VmSize { get { throw null; } set { } } + } + public partial class AmlUserFeature + { + internal AmlUserFeature() { } + public string Description { get { throw null; } } + public string DisplayName { get { throw null; } } + public string Id { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApplicationSharingPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApplicationSharingPolicy(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy Personal { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy Shared { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy left, Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy left, Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AssetPath + { + public AssetPath(string path) { } + public bool? IsDirectory { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + } + public partial class AssignedUser + { + public AssignedUser(string objectId, string tenantId) { } + public string ObjectId { get { throw null; } set { } } + public string TenantId { get { throw null; } set { } } + } + public partial class AuthKeys + { + public AuthKeys() { } + public string PrimaryKey { get { throw null; } set { } } + public string SecondaryKey { get { throw null; } set { } } + } + public partial class AutoScaler + { + public AutoScaler() { } + public bool? AutoscaleEnabled { get { throw null; } set { } } + public int? MaxReplicas { get { throw null; } set { } } + public int? MinReplicas { get { throw null; } set { } } + public int? RefreshPeriodInSeconds { get { throw null; } set { } } + public int? TargetUtilization { get { throw null; } set { } } + } + public partial class AzureDataLakeSection + { + public AzureDataLakeSection(Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials credentials, string storeName) { } + public Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials Credentials { get { throw null; } set { } } + public string StoreName { get { throw null; } set { } } + } + public partial class AzureMySqlSection + { + public AzureMySqlSection(Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) { } + public Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials Credentials { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + public string Endpoint { get { throw null; } set { } } + public int PortNumber { get { throw null; } set { } } + public string ServerName { get { throw null; } set { } } + } + public partial class AzurePostgreSqlSection + { + public AzurePostgreSqlSection(Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) { } + public Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials Credentials { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + public bool? EnableSSL { get { throw null; } set { } } + public string Endpoint { get { throw null; } set { } } + public int PortNumber { get { throw null; } set { } } + public string ServerName { get { throw null; } set { } } + } + public partial class AzureSqlDatabaseSection + { + public AzureSqlDatabaseSection(Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) { } + public Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials Credentials { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + public string Endpoint { get { throw null; } set { } } + public int PortNumber { get { throw null; } set { } } + public string ServerName { get { throw null; } set { } } + } + public partial class AzureStorageSection + { + public AzureStorageSection(string accountName, string containerName, Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials credentials, string endpoint, string protocol) { } + public string AccountName { get { throw null; } set { } } + public int? BlobCacheTimeout { get { throw null; } set { } } + public string ContainerName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.DatastoreCredentials Credentials { get { throw null; } set { } } + public string Endpoint { get { throw null; } set { } } + public string Protocol { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BillingCurrency : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BillingCurrency(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.BillingCurrency USD { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.BillingCurrency other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.BillingCurrency left, Azure.ResourceManager.MachineLearningServices.Models.BillingCurrency right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.BillingCurrency (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.BillingCurrency left, Azure.ResourceManager.MachineLearningServices.Models.BillingCurrency right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CertificateSection + { + public CertificateSection(System.Guid tenantId, System.Guid clientId, string thumbprint) { } + public string AuthorityUrl { get { throw null; } set { } } + public string Certificate { get { throw null; } set { } } + public System.Guid ClientId { get { throw null; } set { } } + public string ResourceUri { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } + public string Thumbprint { get { throw null; } set { } } + } + public partial class ClusterUpdateParameters + { + public ClusterUpdateParameters() { } + public Azure.ResourceManager.MachineLearningServices.Models.ScaleSettings ScaleSettings { get { throw null; } set { } } + } + public partial class CodeConfiguration + { + public CodeConfiguration(string command) { } + public string CodeArtifactId { get { throw null; } set { } } + public string Command { get { throw null; } set { } } + } + public partial class CodeContainer + { + public CodeContainer() { } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class CodeContainerResource + { + public CodeContainerResource(Azure.ResourceManager.MachineLearningServices.Models.CodeContainer properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.CodeContainer Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class CodeContainerResourceArmPaginatedResult + { + internal CodeContainerResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class CodeVersion + { + public CodeVersion() { } + public Azure.ResourceManager.MachineLearningServices.Models.AssetPath AssetPath { get { throw null; } set { } } + public string DatastoreId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class CodeVersionResource + { + public CodeVersionResource(Azure.ResourceManager.MachineLearningServices.Models.CodeVersion properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.CodeVersion Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class CodeVersionResourceArmPaginatedResult + { + internal CodeVersionResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class CommandJob : Azure.ResourceManager.MachineLearningServices.Models.ComputeJobBase + { + public CommandJob(Azure.ResourceManager.MachineLearningServices.Models.ComputeBinding computeBinding, Azure.ResourceManager.MachineLearningServices.Models.CodeConfiguration codeConfiguration) : base (default(Azure.ResourceManager.MachineLearningServices.Models.ComputeBinding)) { } + public Azure.ResourceManager.MachineLearningServices.Models.CodeConfiguration CodeConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IDictionary DataBindings { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.DistributionConfiguration DistributionConfiguration { get { throw null; } set { } } + public string EnvironmentId { get { throw null; } set { } } + public long? MaxRunDurationSeconds { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.JobStatus? Status { get { throw null; } set { } } + } + public partial class Compute + { + public Compute() { } + public string ComputeLocation { get { throw null; } set { } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool? IsAttachedCompute { get { throw null; } } + public System.DateTimeOffset? ModifiedOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProvisioningErrors { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string ResourceId { get { throw null; } set { } } + } + public partial class ComputeBinding + { + public ComputeBinding() { } + public string ComputeId { get { throw null; } set { } } + public bool? IsLocal { get { throw null; } set { } } + public int? NodeCount { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComputeEnvironmentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ComputeEnvironmentType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeEnvironmentType ACI { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeEnvironmentType AKS { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ComputeEnvironmentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ComputeEnvironmentType left, Azure.ResourceManager.MachineLearningServices.Models.ComputeEnvironmentType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ComputeEnvironmentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ComputeEnvironmentType left, Azure.ResourceManager.MachineLearningServices.Models.ComputeEnvironmentType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ComputeInstance : Azure.ResourceManager.MachineLearningServices.Models.Compute + { + public ComputeInstance() { } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceProperties Properties { get { throw null; } set { } } + } + public partial class ComputeInstanceApplication + { + internal ComputeInstanceApplication() { } + public string DisplayName { get { throw null; } } + public string EndpointUri { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComputeInstanceAuthorizationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ComputeInstanceAuthorizationType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceAuthorizationType Personal { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceAuthorizationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceAuthorizationType left, Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceAuthorizationType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceAuthorizationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceAuthorizationType left, Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceAuthorizationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ComputeInstanceConnectivityEndpoints + { + internal ComputeInstanceConnectivityEndpoints() { } + public string PrivateIpAddress { get { throw null; } } + public string PublicIpAddress { get { throw null; } } + } + public partial class ComputeInstanceCreatedBy + { + internal ComputeInstanceCreatedBy() { } + public string UserId { get { throw null; } } + public string UserName { get { throw null; } } + public string UserOrgId { get { throw null; } } + } + public partial class ComputeInstanceLastOperation + { + internal ComputeInstanceLastOperation() { } + public Azure.ResourceManager.MachineLearningServices.Models.OperationName? OperationName { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.OperationStatus? OperationStatus { get { throw null; } } + public System.DateTimeOffset? OperationTime { get { throw null; } } + } + public partial class ComputeInstanceProperties + { + public ComputeInstanceProperties() { } + public System.Collections.Generic.IReadOnlyList Applications { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ApplicationSharingPolicy? ApplicationSharingPolicy { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceAuthorizationType? ComputeInstanceAuthorizationType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceConnectivityEndpoints ConnectivityEndpoints { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceCreatedBy CreatedBy { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceLastOperation LastOperation { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.PersonalComputeInstanceSettings PersonalComputeInstanceSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceSshSettings SshSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState? State { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ResourceId Subnet { get { throw null; } set { } } + public string VmSize { get { throw null; } set { } } + } + public partial class ComputeInstanceSshSettings + { + public ComputeInstanceSshSettings() { } + public string AdminPublicKey { get { throw null; } set { } } + public string AdminUserName { get { throw null; } } + public int? SshPort { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess? SshPublicAccess { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComputeInstanceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ComputeInstanceState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState CreateFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Creating { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Deleting { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState JobRunning { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Restarting { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Running { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState SettingUp { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState SetupFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Starting { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Stopped { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Stopping { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Unknown { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState Unusable { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState UserSettingUp { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState UserSetupFailed { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState left, Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState left, Azure.ResourceManager.MachineLearningServices.Models.ComputeInstanceState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ComputeJobBase : Azure.ResourceManager.MachineLearningServices.Models.JobBase + { + public ComputeJobBase(Azure.ResourceManager.MachineLearningServices.Models.ComputeBinding computeBinding) { } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeBinding ComputeBinding { get { throw null; } set { } } + public string ExperimentName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.JobOutput Output { get { throw null; } set { } } + } + public partial class ComputeNodesInformation + { + internal ComputeNodesInformation() { } + public string NextLink { get { throw null; } } + } + public partial class ComputeResource : Azure.ResourceManager.MachineLearningServices.Models.Resource + { + public ComputeResource() { } + public Azure.ResourceManager.MachineLearningServices.Models.Compute Properties { get { throw null; } set { } } + } + public partial class ComputeSecrets + { + internal ComputeSecrets() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComputeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ComputeType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeType AKS { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeType AmlCompute { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeType ComputeInstance { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeType Databricks { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeType DataFactory { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeType DataLakeAnalytics { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeType HDInsight { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ComputeType VirtualMachine { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ComputeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ComputeType left, Azure.ResourceManager.MachineLearningServices.Models.ComputeType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ComputeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ComputeType left, Azure.ResourceManager.MachineLearningServices.Models.ComputeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ContainerRegistry + { + public ContainerRegistry() { } + public string Address { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + } + public partial class ContainerRegistryResponse + { + public ContainerRegistryResponse() { } + public string Address { get { throw null; } set { } } + } + public partial class ContainerResourceRequirements + { + public ContainerResourceRequirements() { } + public double? Cpu { get { throw null; } set { } } + public int? Fpga { get { throw null; } set { } } + public int? Gpu { get { throw null; } set { } } + public double? MemoryInGB { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContentsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContentsType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ContentsType AzureBlob { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ContentsType AzureDataLake { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ContentsType AzureDataLakeGen2 { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ContentsType AzureFile { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ContentsType AzureMySql { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ContentsType AzurePostgreSql { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ContentsType AzureSqlDatabase { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ContentsType GlusterFs { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ContentsType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ContentsType left, Azure.ResourceManager.MachineLearningServices.Models.ContentsType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ContentsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ContentsType left, Azure.ResourceManager.MachineLearningServices.Models.ContentsType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CreatedByType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CreatedByType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.CreatedByType Application { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.CreatedByType Key { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.CreatedByType ManagedIdentity { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.CreatedByType User { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.CreatedByType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.CreatedByType left, Azure.ResourceManager.MachineLearningServices.Models.CreatedByType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.CreatedByType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.CreatedByType left, Azure.ResourceManager.MachineLearningServices.Models.CreatedByType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CreateEndpointVariantRequest : Azure.ResourceManager.MachineLearningServices.Models.CreateServiceRequest + { + public CreateEndpointVariantRequest() { } + public bool? IsDefault { get { throw null; } set { } } + public float? TrafficPercentile { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.VariantType? Type { get { throw null; } set { } } + } + public partial class CreateServiceRequest + { + public CreateServiceRequest() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.EnvironmentImageRequest EnvironmentImageRequest { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AuthKeys Keys { get { throw null; } set { } } + public System.Collections.Generic.IDictionary KvTags { get { throw null; } } + public string Location { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + } + public partial class CreateServiceRequestEnvironmentImageRequest : Azure.ResourceManager.MachineLearningServices.Models.EnvironmentImageRequest + { + public CreateServiceRequestEnvironmentImageRequest() { } + } + public partial class CreateServiceRequestKeys : Azure.ResourceManager.MachineLearningServices.Models.AuthKeys + { + public CreateServiceRequestKeys() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CredentialsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CredentialsType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.CredentialsType AccountKey { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.CredentialsType Certificate { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.CredentialsType None { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.CredentialsType Sas { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.CredentialsType ServicePrincipal { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.CredentialsType SqlAdmin { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.CredentialsType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.CredentialsType left, Azure.ResourceManager.MachineLearningServices.Models.CredentialsType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.CredentialsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.CredentialsType left, Azure.ResourceManager.MachineLearningServices.Models.CredentialsType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataBinding + { + public DataBinding() { } + public string LocalReference { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode? Mode { get { throw null; } set { } } + public string SourceDataReference { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataBindingMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataBindingMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode Download { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode Mount { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode Upload { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode left, Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode left, Azure.ResourceManager.MachineLearningServices.Models.DataBindingMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Databricks : Azure.ResourceManager.MachineLearningServices.Models.Compute + { + public Databricks() { } + public Azure.ResourceManager.MachineLearningServices.Models.DatabricksProperties Properties { get { throw null; } set { } } + } + public partial class DatabricksComputeSecrets : Azure.ResourceManager.MachineLearningServices.Models.ComputeSecrets + { + internal DatabricksComputeSecrets() { } + public string DatabricksAccessToken { get { throw null; } } + } + public partial class DatabricksProperties + { + public DatabricksProperties() { } + public string DatabricksAccessToken { get { throw null; } set { } } + } + public partial class DataContainer + { + public DataContainer() { } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class DataContainerResource + { + public DataContainerResource(Azure.ResourceManager.MachineLearningServices.Models.DataContainer properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.DataContainer Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class DataContainerResourceArmPaginatedResult + { + internal DataContainerResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class DataFactory : Azure.ResourceManager.MachineLearningServices.Models.Compute + { + public DataFactory() { } + } + public partial class DataLakeAnalytics : Azure.ResourceManager.MachineLearningServices.Models.Compute + { + public DataLakeAnalytics() { } + public Azure.ResourceManager.MachineLearningServices.Models.DataLakeAnalyticsProperties Properties { get { throw null; } set { } } + } + public partial class DataLakeAnalyticsProperties + { + public DataLakeAnalyticsProperties() { } + public string DataLakeStoreAccountName { get { throw null; } set { } } + } + public partial class DatasetReference + { + public DatasetReference() { } + public string Id { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatasetType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatasetType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.DatasetType Dataflow { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.DatasetType Simple { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.DatasetType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.DatasetType left, Azure.ResourceManager.MachineLearningServices.Models.DatasetType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.DatasetType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.DatasetType left, Azure.ResourceManager.MachineLearningServices.Models.DatasetType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatastoreContents + { + public DatastoreContents(Azure.ResourceManager.MachineLearningServices.Models.ContentsType type) { } + public Azure.ResourceManager.MachineLearningServices.Models.AzureDataLakeSection AzureDataLake { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AzureMySqlSection AzureMySql { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AzurePostgreSqlSection AzurePostgreSql { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AzureSqlDatabaseSection AzureSqlDatabase { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.AzureStorageSection AzureStorage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.GlusterFsSection GlusterFs { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ContentsType Type { get { throw null; } set { } } + } + public partial class DatastoreCredentials + { + public DatastoreCredentials(Azure.ResourceManager.MachineLearningServices.Models.CredentialsType type) { } + public Azure.ResourceManager.MachineLearningServices.Models.AccountKeySection AccountKey { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.CertificateSection Certificate { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SasSection Sas { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ServicePrincipalSection ServicePrincipal { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SqlAdminSection SqlAdmin { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.CredentialsType Type { get { throw null; } set { } } + } + public partial class DatastoreProperties + { + public DatastoreProperties(Azure.ResourceManager.MachineLearningServices.Models.DatastoreContents contents) { } + public Azure.ResourceManager.MachineLearningServices.Models.DatastoreContents Contents { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public bool? HasBeenValidated { get { throw null; } } + public bool? IsDefault { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.LinkedInfo LinkedInfo { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class DatastorePropertiesResource + { + public DatastorePropertiesResource(Azure.ResourceManager.MachineLearningServices.Models.DatastoreProperties properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.DatastoreProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class DatastorePropertiesResourceArmPaginatedResult + { + internal DatastorePropertiesResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class DataVersion + { + public DataVersion() { } + public Azure.ResourceManager.MachineLearningServices.Models.AssetPath AssetPath { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.DatasetType? DatasetType { get { throw null; } set { } } + public string DatastoreId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class DataVersionResource + { + public DataVersionResource(Azure.ResourceManager.MachineLearningServices.Models.DataVersion properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.DataVersion Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class DataVersionResourceArmPaginatedResult + { + internal DataVersionResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeploymentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeploymentType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.DeploymentType Batch { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.DeploymentType GrpcRealtimeEndpoint { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.DeploymentType HttpRealtimeEndpoint { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.DeploymentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.DeploymentType left, Azure.ResourceManager.MachineLearningServices.Models.DeploymentType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.DeploymentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.DeploymentType left, Azure.ResourceManager.MachineLearningServices.Models.DeploymentType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DistributionConfiguration + { + public DistributionConfiguration() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DistributionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DistributionType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.DistributionType Mpi { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.DistributionType PyTorch { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.DistributionType TensorFlow { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.DistributionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.DistributionType left, Azure.ResourceManager.MachineLearningServices.Models.DistributionType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.DistributionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.DistributionType left, Azure.ResourceManager.MachineLearningServices.Models.DistributionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DockerSpecification + { + public DockerSpecification() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DockerSpecificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DockerSpecificationType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.DockerSpecificationType Build { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.DockerSpecificationType Image { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.DockerSpecificationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.DockerSpecificationType left, Azure.ResourceManager.MachineLearningServices.Models.DockerSpecificationType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.DockerSpecificationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.DockerSpecificationType left, Azure.ResourceManager.MachineLearningServices.Models.DockerSpecificationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EarlyTerminationPolicyConfiguration + { + public EarlyTerminationPolicyConfiguration() { } + public int? DelayEvaluation { get { throw null; } set { } } + public int? EvaluationInterval { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EarlyTerminationPolicyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EarlyTerminationPolicyType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType Bandit { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType MedianStopping { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType TruncationSelection { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType left, Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType left, Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EncryptionProperties + { + public EncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) { } + public string KeyName { get { throw null; } set { } } + public string KeyVersion { get { throw null; } set { } } + public string VaultBaseUrl { get { throw null; } set { } } + } + public partial class EncryptionProperty + { + public EncryptionProperty(Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus status, Azure.ResourceManager.MachineLearningServices.Models.KeyVaultProperties keyVaultProperties) { } + public Azure.ResourceManager.MachineLearningServices.Models.KeyVaultProperties KeyVaultProperties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus Status { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EncryptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EncryptionStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus left, Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus left, Azure.ResourceManager.MachineLearningServices.Models.EncryptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EnvironmentContainer + { + public EnvironmentContainer() { } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class EnvironmentContainerResource + { + public EnvironmentContainerResource(Azure.ResourceManager.MachineLearningServices.Models.EnvironmentContainer properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.EnvironmentContainer Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class EnvironmentContainerResourceArmPaginatedResult + { + internal EnvironmentContainerResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class EnvironmentImageRequest + { + public EnvironmentImageRequest() { } + public System.Collections.Generic.IList Assets { get { throw null; } } + public string DriverProgram { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelEnvironmentDefinition Environment { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.EnvironmentReference EnvironmentReference { get { throw null; } set { } } + public System.Collections.Generic.IList ModelIds { get { throw null; } } + public System.Collections.Generic.IList Models { get { throw null; } } + } + public partial class EnvironmentImageRequestEnvironment : Azure.ResourceManager.MachineLearningServices.Models.ModelEnvironmentDefinition + { + public EnvironmentImageRequestEnvironment() { } + } + public partial class EnvironmentImageRequestEnvironmentReference : Azure.ResourceManager.MachineLearningServices.Models.EnvironmentReference + { + public EnvironmentImageRequestEnvironmentReference() { } + } + public partial class EnvironmentImageResponse + { + public EnvironmentImageResponse() { } + public System.Collections.Generic.IList Assets { get { throw null; } } + public string DriverProgram { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelEnvironmentDefinitionResponse Environment { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.EnvironmentReference EnvironmentReference { get { throw null; } set { } } + public System.Collections.Generic.IList ModelIds { get { throw null; } } + public System.Collections.Generic.IList Models { get { throw null; } } + } + public partial class EnvironmentImageResponseEnvironment : Azure.ResourceManager.MachineLearningServices.Models.ModelEnvironmentDefinitionResponse + { + public EnvironmentImageResponseEnvironment() { } + } + public partial class EnvironmentImageResponseEnvironmentReference : Azure.ResourceManager.MachineLearningServices.Models.EnvironmentReference + { + public EnvironmentImageResponseEnvironmentReference() { } + } + public partial class EnvironmentReference + { + public EnvironmentReference() { } + public string Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnvironmentSpecificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnvironmentSpecificationType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType Curated { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType UserCreated { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType left, Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType left, Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EnvironmentSpecificationVersion + { + public EnvironmentSpecificationVersion() { } + public Azure.ResourceManager.MachineLearningServices.Models.AssetPath AssetPath { get { throw null; } set { } } + public string CondaFile { get { throw null; } set { } } + public string DatastoreId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.DockerSpecification Docker { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationType? Type { get { throw null; } } + } + public partial class EnvironmentSpecificationVersionResource + { + public EnvironmentSpecificationVersionResource(Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationVersion properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.EnvironmentSpecificationVersion Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class EnvironmentSpecificationVersionResourceArmPaginatedResult + { + internal EnvironmentSpecificationVersionResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class ErrorDetail + { + internal ErrorDetail() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + } + public partial class ErrorResponse + { + internal ErrorResponse() { } + public string Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public string Message { get { throw null; } } + } + public partial class EstimatedVMPrice + { + internal EstimatedVMPrice() { } + public Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType OsType { get { throw null; } } + public double RetailPrice { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.VMTier VmTier { get { throw null; } } + } + public partial class EstimatedVMPrices + { + internal EstimatedVMPrices() { } + public Azure.ResourceManager.MachineLearningServices.Models.BillingCurrency BillingCurrency { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.UnitOfMeasure UnitOfMeasure { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + } + public partial class EvaluationConfiguration + { + public EvaluationConfiguration(string primaryMetricName, Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal primaryMetricGoal) { } + public Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal PrimaryMetricGoal { get { throw null; } set { } } + public string PrimaryMetricName { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExportFormatType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExportFormatType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType Coco { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType CSV { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType Dataset { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType left, Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType left, Azure.ResourceManager.MachineLearningServices.Models.ExportFormatType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExportSummary + { + internal ExportSummary() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } } + public long? ExportedRowCount { get { throw null; } } + public System.Guid? ExportId { get { throw null; } } + public string LabelingJobId { get { throw null; } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.LabelExportState? State { get { throw null; } } + } + public partial class ExportSummaryResource + { + internal ExportSummaryResource() { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ExportSummary Properties { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class GlusterFsSection + { + public GlusterFsSection(string serverAddress, string volumeName) { } + public string ServerAddress { get { throw null; } set { } } + public string VolumeName { get { throw null; } set { } } + } + public partial class HDInsight : Azure.ResourceManager.MachineLearningServices.Models.Compute + { + public HDInsight() { } + public Azure.ResourceManager.MachineLearningServices.Models.HDInsightProperties Properties { get { throw null; } set { } } + } + public partial class HDInsightProperties + { + public HDInsightProperties() { } + public string Address { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.VirtualMachineSshCredentials AdministratorAccount { get { throw null; } set { } } + public int? SshPort { get { throw null; } set { } } + } + public partial class Identity + { + public Identity() { } + public string PrincipalId { get { throw null; } } + public string TenantId { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ResourceIdentityType? Type { get { throw null; } set { } } + public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + } + public partial class ImageAsset + { + public ImageAsset() { } + public string Id { get { throw null; } set { } } + public string MimeType { get { throw null; } set { } } + public bool? Unpack { get { throw null; } set { } } + public string Url { get { throw null; } set { } } + } + public partial class JobBase + { + public JobBase() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.JobBaseInteractionEndpoints InteractionEndpoints { get { throw null; } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class JobBaseInteractionEndpoints + { + internal JobBaseInteractionEndpoints() { } + public object Grafana { get { throw null; } } + public object Local { get { throw null; } } + public object LocalRequest { get { throw null; } } + public object Studio { get { throw null; } } + public object Tensorboard { get { throw null; } } + public object Tracking { get { throw null; } } + } + public partial class JobBaseResource + { + public JobBaseResource(Azure.ResourceManager.MachineLearningServices.Models.JobBase properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.JobBase Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class JobBaseResourceArmPaginatedResult + { + internal JobBaseResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class JobOutput + { + public JobOutput() { } + public string DatastoreId { get { throw null; } } + public string Path { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus CancelRequested { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Completed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Finalizing { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus NotResponding { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Paused { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Preparing { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Provisioning { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Queued { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Running { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobStatus Starting { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.JobStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.JobStatus left, Azure.ResourceManager.MachineLearningServices.Models.JobStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.JobStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.JobStatus left, Azure.ResourceManager.MachineLearningServices.Models.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.JobType AutoML { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobType Command { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobType Data { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobType Labeling { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobType Pipeline { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.JobType Sweep { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.JobType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.JobType left, Azure.ResourceManager.MachineLearningServices.Models.JobType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.JobType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.JobType left, Azure.ResourceManager.MachineLearningServices.Models.JobType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KeyVaultProperties + { + public KeyVaultProperties(string keyVaultArmId, string keyIdentifier) { } + public string IdentityClientId { get { throw null; } set { } } + public string KeyIdentifier { get { throw null; } set { } } + public string KeyVaultArmId { get { throw null; } set { } } + } + public partial class LabelCategory + { + public LabelCategory() { } + public bool? AllowMultiSelect { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Classes { get { throw null; } } + public string DisplayName { get { throw null; } set { } } + } + public partial class LabelClass + { + public LabelClass() { } + public string DisplayName { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Subclasses { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LabelExportState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LabelExportState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.LabelExportState Completed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.LabelExportState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.LabelExportState Requested { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.LabelExportState Running { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.LabelExportState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.LabelExportState left, Azure.ResourceManager.MachineLearningServices.Models.LabelExportState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.LabelExportState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.LabelExportState left, Azure.ResourceManager.MachineLearningServices.Models.LabelExportState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LabelingDatasetConfiguration + { + public LabelingDatasetConfiguration() { } + public string AssetName { get { throw null; } set { } } + public string DatasetVersion { get { throw null; } set { } } + public bool? IncrementalDatasetRefreshEnabled { get { throw null; } set { } } + } + public partial class LabelingJob : Azure.ResourceManager.MachineLearningServices.Models.JobBase + { + public LabelingJob() { } + public System.DateTimeOffset? CreatedTimeUtc { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.LabelingDatasetConfiguration DatasetConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.LabelingJobInstructions JobInstructions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary LabelCategories { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.LabelingJobMediaProperties LabelingJobMediaProperties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.MLAssistConfiguration MlAssistConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ProgressMetrics ProgressMetrics { get { throw null; } set { } } + public System.Guid? ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.JobStatus? Status { get { throw null; } set { } } + public System.Collections.Generic.IList StatusMessages { get { throw null; } } + } + public partial class LabelingJobInstructions + { + public LabelingJobInstructions() { } + public string Uri { get { throw null; } set { } } + } + public partial class LabelingJobMediaProperties + { + public LabelingJobMediaProperties() { } + } + public partial class LabelingJobResource + { + public LabelingJobResource(Azure.ResourceManager.MachineLearningServices.Models.LabelingJob properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.LabelingJob Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class LabelingJobResourceArmPaginatedResult + { + internal LabelingJobResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class LinkedInfo + { + public LinkedInfo() { } + public string LinkedId { get { throw null; } set { } } + public string LinkedResourceName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.OriginType? Origin { get { throw null; } set { } } + } + public partial class LinkedServiceList + { + internal LinkedServiceList() { } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class LinkedServiceProps + { + public LinkedServiceProps(string linkedServiceResourceId) { } + public System.DateTimeOffset? CreatedTime { get { throw null; } set { } } + public string LinkedServiceResourceId { get { throw null; } set { } } + public string LinkType { get { throw null; } set { } } + public System.DateTimeOffset? ModifiedTime { get { throw null; } set { } } + } + public partial class LinkedServiceRequest + { + public LinkedServiceRequest() { } + public Azure.ResourceManager.MachineLearningServices.Models.Identity Identity { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.LinkedServiceProps Properties { get { throw null; } set { } } + } + public partial class LinkedServiceResponse + { + internal LinkedServiceResponse() { } + public string Id { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.Identity Identity { get { throw null; } } + public string Location { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.LinkedServiceProps Properties { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class ListAmlUserFeatureResult + { + internal ListAmlUserFeatureResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class ListNotebookKeysResult + { + internal ListNotebookKeysResult() { } + public string PrimaryAccessKey { get { throw null; } } + public string SecondaryAccessKey { get { throw null; } } + } + public partial class ListUsagesResult + { + internal ListUsagesResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class ListWorkspaceKeysResult + { + internal ListWorkspaceKeysResult() { } + public string AppInsightsInstrumentationKey { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.RegistryListCredentialsResult ContainerRegistryCredentials { get { throw null; } } + public string UserStorageKey { get { throw null; } } + public string UserStorageResourceId { get { throw null; } } + } + public partial class ListWorkspaceQuotas + { + internal ListWorkspaceQuotas() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class LivenessProbeRequirements + { + public LivenessProbeRequirements() { } + public int? FailureThreshold { get { throw null; } set { } } + public int? InitialDelaySeconds { get { throw null; } set { } } + public int? PeriodSeconds { get { throw null; } set { } } + public int? SuccessThreshold { get { throw null; } set { } } + public int? TimeoutSeconds { get { throw null; } set { } } + } + public partial class MachineLearningServiceError + { + internal MachineLearningServiceError() { } + public Azure.ResourceManager.MachineLearningServices.Models.ErrorResponse Error { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MediaType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MediaType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.MediaType Image { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.MediaType Text { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.MediaType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.MediaType left, Azure.ResourceManager.MachineLearningServices.Models.MediaType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.MediaType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.MediaType left, Azure.ResourceManager.MachineLearningServices.Models.MediaType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MLAssistConfiguration + { + public MLAssistConfiguration() { } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeBinding InferencingComputeBinding { get { throw null; } set { } } + public bool? MlAssistEnabled { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ComputeBinding TrainingComputeBinding { get { throw null; } set { } } + } + public partial class Model + { + public Model(string name, string url, string mimeType) { } + public System.DateTimeOffset? CreatedTime { get { throw null; } set { } } + public System.Collections.Generic.IList Datasets { get { throw null; } } + public System.Collections.Generic.IList DerivedModelIds { get { throw null; } } + public string Description { get { throw null; } set { } } + public string ExperimentName { get { throw null; } set { } } + public string Framework { get { throw null; } set { } } + public string FrameworkVersion { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public System.Collections.Generic.IDictionary KvTags { get { throw null; } } + public string MimeType { get { throw null; } set { } } + public System.DateTimeOffset? ModifiedTime { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string ParentModelId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ContainerResourceRequirements ResourceRequirements { get { throw null; } set { } } + public string RunId { get { throw null; } set { } } + public string SampleInputData { get { throw null; } set { } } + public string SampleOutputData { get { throw null; } set { } } + public bool? Unpack { get { throw null; } set { } } + public string Url { get { throw null; } set { } } + public long? Version { get { throw null; } set { } } + } + public partial class ModelContainer + { + public ModelContainer() { } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IList LatestVersions { get { throw null; } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class ModelContainerResource + { + public ModelContainerResource(Azure.ResourceManager.MachineLearningServices.Models.ModelContainer properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelContainer Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class ModelContainerResourceArmPaginatedResult + { + internal ModelContainerResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class ModelDataCollection + { + public ModelDataCollection() { } + public bool? EventHubEnabled { get { throw null; } set { } } + public bool? StorageEnabled { get { throw null; } set { } } + } + public partial class ModelDockerSection + { + public ModelDockerSection() { } + public string BaseDockerfile { get { throw null; } set { } } + public string BaseImage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ContainerRegistry BaseImageRegistry { get { throw null; } set { } } + } + public partial class ModelDockerSectionBaseImageRegistry : Azure.ResourceManager.MachineLearningServices.Models.ContainerRegistry + { + public ModelDockerSectionBaseImageRegistry() { } + } + public partial class ModelDockerSectionResponse + { + public ModelDockerSectionResponse() { } + public string BaseDockerfile { get { throw null; } set { } } + public string BaseImage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ContainerRegistryResponse BaseImageRegistry { get { throw null; } set { } } + } + public partial class ModelDockerSectionResponseBaseImageRegistry : Azure.ResourceManager.MachineLearningServices.Models.ContainerRegistryResponse + { + public ModelDockerSectionResponseBaseImageRegistry() { } + } + public partial class ModelEnvironmentDefinition + { + public ModelEnvironmentDefinition() { } + public Azure.ResourceManager.MachineLearningServices.Models.ModelDockerSection Docker { get { throw null; } set { } } + public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } } + public string InferencingStackVersion { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelPythonSection Python { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.RSection R { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelSparkSection Spark { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + } + public partial class ModelEnvironmentDefinitionDocker : Azure.ResourceManager.MachineLearningServices.Models.ModelDockerSection + { + public ModelEnvironmentDefinitionDocker() { } + } + public partial class ModelEnvironmentDefinitionPython : Azure.ResourceManager.MachineLearningServices.Models.ModelPythonSection + { + public ModelEnvironmentDefinitionPython() { } + } + public partial class ModelEnvironmentDefinitionR : Azure.ResourceManager.MachineLearningServices.Models.RSection + { + public ModelEnvironmentDefinitionR() { } + } + public partial class ModelEnvironmentDefinitionResponse + { + public ModelEnvironmentDefinitionResponse() { } + public Azure.ResourceManager.MachineLearningServices.Models.ModelDockerSectionResponse Docker { get { throw null; } set { } } + public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } } + public string InferencingStackVersion { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelPythonSection Python { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.RSectionResponse R { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelSparkSection Spark { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + } + public partial class ModelEnvironmentDefinitionResponseDocker : Azure.ResourceManager.MachineLearningServices.Models.ModelDockerSectionResponse + { + public ModelEnvironmentDefinitionResponseDocker() { } + } + public partial class ModelEnvironmentDefinitionResponsePython : Azure.ResourceManager.MachineLearningServices.Models.ModelPythonSection + { + public ModelEnvironmentDefinitionResponsePython() { } + } + public partial class ModelEnvironmentDefinitionResponseR : Azure.ResourceManager.MachineLearningServices.Models.RSectionResponse + { + public ModelEnvironmentDefinitionResponseR() { } + } + public partial class ModelEnvironmentDefinitionResponseSpark : Azure.ResourceManager.MachineLearningServices.Models.ModelSparkSection + { + public ModelEnvironmentDefinitionResponseSpark() { } + } + public partial class ModelEnvironmentDefinitionSpark : Azure.ResourceManager.MachineLearningServices.Models.ModelSparkSection + { + public ModelEnvironmentDefinitionSpark() { } + } + public partial class ModelPythonSection + { + public ModelPythonSection() { } + public string BaseCondaEnvironment { get { throw null; } set { } } + public object CondaDependencies { get { throw null; } set { } } + public string InterpreterPath { get { throw null; } set { } } + public bool? UserManagedDependencies { get { throw null; } set { } } + } + public partial class ModelSparkSection + { + public ModelSparkSection() { } + public System.Collections.Generic.IList Packages { get { throw null; } } + public bool? PrecachePackages { get { throw null; } set { } } + public System.Collections.Generic.IList Repositories { get { throw null; } } + } + public partial class ModelVersion + { + public ModelVersion() { } + public Azure.ResourceManager.MachineLearningServices.Models.AssetPath AssetPath { get { throw null; } set { } } + public string DatastoreId { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public string Stage { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class ModelVersionResource + { + public ModelVersionResource(Azure.ResourceManager.MachineLearningServices.Models.ModelVersion properties) { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ModelVersion Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SystemData SystemData { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class ModelVersionResourceArmPaginatedResult + { + internal ModelVersionResourceArmPaginatedResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NodeState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NodeState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.NodeState Idle { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.NodeState Leaving { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.NodeState Preempted { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.NodeState Preparing { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.NodeState Running { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.NodeState Unusable { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.NodeState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.NodeState left, Azure.ResourceManager.MachineLearningServices.Models.NodeState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.NodeState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.NodeState left, Azure.ResourceManager.MachineLearningServices.Models.NodeState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NodeStateCounts + { + internal NodeStateCounts() { } + public int? IdleNodeCount { get { throw null; } } + public int? LeavingNodeCount { get { throw null; } } + public int? PreemptedNodeCount { get { throw null; } } + public int? PreparingNodeCount { get { throw null; } } + public int? RunningNodeCount { get { throw null; } } + public int? UnusableNodeCount { get { throw null; } } + } + public partial class NotebookPreparationError + { + internal NotebookPreparationError() { } + public string ErrorMessage { get { throw null; } } + public int? StatusCode { get { throw null; } } + } + public partial class NotebookResourceInfo + { + internal NotebookResourceInfo() { } + public string Fqdn { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.NotebookPreparationError NotebookPreparationError { get { throw null; } } + public string ResourceId { get { throw null; } } + } + public partial class Operation + { + internal Operation() { } + public Azure.ResourceManager.MachineLearningServices.Models.OperationDisplay Display { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class OperationDisplay + { + internal OperationDisplay() { } + public string Description { get { throw null; } } + public string Operation { get { throw null; } } + public string Provider { get { throw null; } } + public string Resource { get { throw null; } } + } + public partial class OperationListResult + { + internal OperationListResult() { } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OperationName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OperationName(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationName Create { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationName Delete { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationName Reimage { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationName Restart { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationName Start { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationName Stop { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.OperationName other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.OperationName left, Azure.ResourceManager.MachineLearningServices.Models.OperationName right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.OperationName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.OperationName left, Azure.ResourceManager.MachineLearningServices.Models.OperationName right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OperationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OperationStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationStatus CreateFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationStatus DeleteFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationStatus InProgress { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationStatus ReimageFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationStatus RestartFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationStatus StartFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationStatus StopFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.OperationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.OperationStatus left, Azure.ResourceManager.MachineLearningServices.Models.OperationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.OperationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.OperationStatus left, Azure.ResourceManager.MachineLearningServices.Models.OperationStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OrderString : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OrderString(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.OrderString CreatedAtAsc { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OrderString CreatedAtDesc { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OrderString UpdatedAtAsc { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OrderString UpdatedAtDesc { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.OrderString other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.OrderString left, Azure.ResourceManager.MachineLearningServices.Models.OrderString right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.OrderString (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.OrderString left, Azure.ResourceManager.MachineLearningServices.Models.OrderString right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OriginType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OriginType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.OriginType Synapse { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.OriginType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.OriginType left, Azure.ResourceManager.MachineLearningServices.Models.OriginType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.OriginType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.OriginType left, Azure.ResourceManager.MachineLearningServices.Models.OriginType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OsType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.OsType Linux { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.OsType Windows { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.OsType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.OsType left, Azure.ResourceManager.MachineLearningServices.Models.OsType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.OsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.OsType left, Azure.ResourceManager.MachineLearningServices.Models.OsType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PaginatedComputeResourcesList + { + internal PaginatedComputeResourcesList() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class PaginatedServiceList + { + internal PaginatedServiceList() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class PaginatedWorkspaceConnectionsList + { + internal PaginatedWorkspaceConnectionsList() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class ParameterSamplingConfiguration + { + public ParameterSamplingConfiguration(object parameterSpace, Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType samplingType) { } + public object ParameterSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType SamplingType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ParameterSamplingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ParameterSamplingType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType Bayesian { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType Grid { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType Random { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType left, Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType left, Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Password + { + internal Password() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } + } + public partial class PersonalComputeInstanceSettings + { + public PersonalComputeInstanceSettings() { } + public Azure.ResourceManager.MachineLearningServices.Models.AssignedUser AssignedUser { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PrimaryMetricGoal : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PrimaryMetricGoal(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal Maximize { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal Minimize { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal left, Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal left, Azure.ResourceManager.MachineLearningServices.Models.PrimaryMetricGoal right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PrivateEndpoint + { + public PrivateEndpoint() { } + public string Id { get { throw null; } } + } + public partial class PrivateEndpointConnection : Azure.ResourceManager.MachineLearningServices.Models.Resource + { + public PrivateEndpointConnection() { } + public Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpoint PrivateEndpoint { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PrivateEndpointConnectionProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PrivateEndpointConnectionProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState left, Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState left, Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointConnectionProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PrivateEndpointServiceConnectionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PrivateEndpointServiceConnectionStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus Approved { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus Disconnected { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus Pending { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus Rejected { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus Timeout { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus left, Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus left, Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PrivateLinkResource : Azure.ResourceManager.MachineLearningServices.Models.Resource + { + public PrivateLinkResource() { } + public string GroupId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } + } + public partial class PrivateLinkResourceListResult + { + internal PrivateLinkResourceListResult() { } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class PrivateLinkServiceConnectionState + { + public PrivateLinkServiceConnectionState() { } + public string ActionsRequired { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + } + public partial class ProgressMetrics + { + public ProgressMetrics() { } + public long? CompletedDatapointCount { get { throw null; } } + public System.DateTimeOffset? IncrementalDatasetLastRefreshTime { get { throw null; } } + public long? SkippedDatapointCount { get { throw null; } } + public long? TotalDatapointCount { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState Unknown { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState left, Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState left, Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class QuotaBaseProperties + { + public QuotaBaseProperties() { } + public string Id { get { throw null; } set { } } + public long? Limit { get { throw null; } set { } } + public string Type { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit? Unit { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct QuotaUnit : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public QuotaUnit(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit Count { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit left, Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit left, Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit right) { throw null; } + public override string ToString() { throw null; } + } + public partial class QuotaUpdateParameters + { + public QuotaUpdateParameters() { } + public string Location { get { throw null; } set { } } + public System.Collections.Generic.IList Value { get { throw null; } } + } + public partial class RCranPackage + { + public RCranPackage() { } + public string Name { get { throw null; } set { } } + public string Repository { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ReasonCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReasonCode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.ReasonCode NotAvailableForRegion { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ReasonCode NotAvailableForSubscription { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.ReasonCode NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.ReasonCode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.ReasonCode left, Azure.ResourceManager.MachineLearningServices.Models.ReasonCode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.ReasonCode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.ReasonCode left, Azure.ResourceManager.MachineLearningServices.Models.ReasonCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RegistryListCredentialsResult + { + internal RegistryListCredentialsResult() { } + public string Location { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Passwords { get { throw null; } } + public string Username { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RemoteLoginPortPublicAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RemoteLoginPortPublicAccess(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess Enabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess left, Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess left, Azure.ResourceManager.MachineLearningServices.Models.RemoteLoginPortPublicAccess right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Resource + { + public Resource() { } + public string Id { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.Identity Identity { get { throw null; } set { } } + public string Location { get { throw null; } set { } } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.Sku Sku { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string Type { get { throw null; } } + } + public partial class ResourceId + { + public ResourceId(string id) { } + public string Id { get { throw null; } set { } } + } + public enum ResourceIdentityType + { + SystemAssigned = 0, + SystemAssignedUserAssigned = 1, + UserAssigned = 2, + None = 3, + } + public partial class ResourceName + { + internal ResourceName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } + } + public partial class ResourceQuota + { + internal ResourceQuota() { } + public string AmlWorkspaceLocation { get { throw null; } } + public string Id { get { throw null; } } + public long? Limit { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ResourceName Name { get { throw null; } } + public string Type { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit? Unit { get { throw null; } } + } + public partial class ResourceSkuLocationInfo + { + internal ResourceSkuLocationInfo() { } + public string Location { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ZoneDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } + } + public partial class ResourceSkuZoneDetails + { + internal ResourceSkuZoneDetails() { } + public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Name { get { throw null; } } + } + public partial class Restriction + { + internal Restriction() { } + public Azure.ResourceManager.MachineLearningServices.Models.ReasonCode? ReasonCode { get { throw null; } } + public string Type { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + } + public partial class RGitHubPackage + { + public RGitHubPackage() { } + public string AuthToken { get { throw null; } set { } } + public string Repository { get { throw null; } set { } } + } + public partial class RGitHubPackageResponse + { + public RGitHubPackageResponse() { } + public string Repository { get { throw null; } set { } } + } + public partial class RSection + { + public RSection() { } + public System.Collections.Generic.IList BioConductorPackages { get { throw null; } } + public System.Collections.Generic.IList CranPackages { get { throw null; } } + public System.Collections.Generic.IList CustomUrlPackages { get { throw null; } } + public System.Collections.Generic.IList GitHubPackages { get { throw null; } } + public string RscriptPath { get { throw null; } set { } } + public string RVersion { get { throw null; } set { } } + public string SnapshotDate { get { throw null; } set { } } + public bool? UserManaged { get { throw null; } set { } } + } + public partial class RSectionResponse + { + public RSectionResponse() { } + public System.Collections.Generic.IList BioConductorPackages { get { throw null; } } + public System.Collections.Generic.IList CranPackages { get { throw null; } } + public System.Collections.Generic.IList CustomUrlPackages { get { throw null; } } + public System.Collections.Generic.IList GitHubPackages { get { throw null; } } + public string RscriptPath { get { throw null; } set { } } + public string RVersion { get { throw null; } set { } } + public string SnapshotDate { get { throw null; } set { } } + public bool? UserManaged { get { throw null; } set { } } + } + public partial class SasSection + { + public SasSection() { } + public string SasToken { get { throw null; } set { } } + } + public partial class ScaleSettings + { + public ScaleSettings(int maxNodeCount) { } + public int MaxNodeCount { get { throw null; } set { } } + public int? MinNodeCount { get { throw null; } set { } } + public System.TimeSpan? NodeIdleTimeBeforeScaleDown { get { throw null; } set { } } + } + public partial class ServicePrincipalSection + { + public ServicePrincipalSection(System.Guid tenantId, System.Guid clientId) { } + public string AuthorityUrl { get { throw null; } set { } } + public System.Guid ClientId { get { throw null; } set { } } + public string ClientSecret { get { throw null; } set { } } + public string ResourceUri { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } + } + public partial class ServiceResource : Azure.ResourceManager.MachineLearningServices.Models.Resource + { + public ServiceResource() { } + public Azure.ResourceManager.MachineLearningServices.Models.ServiceResponseBase Properties { get { throw null; } set { } } + } + public partial class ServiceResponseBase + { + public ServiceResponseBase() { } + public Azure.ResourceManager.MachineLearningServices.Models.DeploymentType? DeploymentType { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ErrorResponse Error { get { throw null; } } + public System.Collections.Generic.IDictionary KvTags { get { throw null; } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.WebServiceState? State { get { throw null; } } + } + public partial class ServiceResponseBaseError : Azure.ResourceManager.MachineLearningServices.Models.ErrorResponse + { + internal ServiceResponseBaseError() { } + } + public partial class SharedPrivateLinkResource + { + public SharedPrivateLinkResource() { } + public string GroupId { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string PrivateLinkResourceId { get { throw null; } set { } } + public string RequestMessage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.PrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + } + public partial class Sku + { + public Sku() { } + public string Name { get { throw null; } set { } } + public string Tier { get { throw null; } set { } } + } + public partial class SKUCapability + { + internal SKUCapability() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } + } + public partial class SkuListResult + { + internal SkuListResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class SparkMavenPackage + { + public SparkMavenPackage() { } + public string Artifact { get { throw null; } set { } } + public string Group { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + } + public partial class SqlAdminSection + { + public SqlAdminSection(string userId) { } + public string Password { get { throw null; } set { } } + public string UserId { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SshPublicAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SshPublicAccess(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess left, Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess left, Azure.ResourceManager.MachineLearningServices.Models.SshPublicAccess right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SslConfiguration + { + public SslConfiguration() { } + public string Cert { get { throw null; } set { } } + public string Cname { get { throw null; } set { } } + public string Key { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus? Status { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SslConfigurationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SslConfigurationStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus left, Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus left, Azure.ResourceManager.MachineLearningServices.Models.SslConfigurationStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Status : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Status(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.Status Failure { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.Status InvalidQuotaBelowClusterMinimum { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.Status InvalidQuotaExceedsSubscriptionLimit { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.Status InvalidVMFamilyName { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.Status OperationNotEnabledForRegion { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.Status OperationNotSupportedForSku { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.Status Success { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.Status Undefined { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.Status other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.Status left, Azure.ResourceManager.MachineLearningServices.Models.Status right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.Status (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.Status left, Azure.ResourceManager.MachineLearningServices.Models.Status right) { throw null; } + public override string ToString() { throw null; } + } + public partial class StatusMessage + { + public StatusMessage() { } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedTimeUtc { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel? Level { get { throw null; } } + public string Message { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StatusMessageLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StatusMessageLevel(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel Error { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel Information { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel left, Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel left, Azure.ResourceManager.MachineLearningServices.Models.StatusMessageLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SweepJob : Azure.ResourceManager.MachineLearningServices.Models.ComputeJobBase + { + public SweepJob(Azure.ResourceManager.MachineLearningServices.Models.ComputeBinding computeBinding, Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingConfiguration parameterSamplingConfiguration, Azure.ResourceManager.MachineLearningServices.Models.EvaluationConfiguration evaluationConfiguration) : base (default(Azure.ResourceManager.MachineLearningServices.Models.ComputeBinding)) { } + public Azure.ResourceManager.MachineLearningServices.Models.EvaluationConfiguration EvaluationConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.ParameterSamplingConfiguration ParameterSamplingConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.JobStatus? Status { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.TerminationConfiguration TerminationConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.TrialComponent TrialComponent { get { throw null; } set { } } + } + public partial class SystemData + { + internal SystemData() { } + public System.DateTimeOffset? CreatedAt { get { throw null; } } + public string CreatedBy { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.CreatedByType? CreatedByType { get { throw null; } } + public System.DateTimeOffset? LastModifiedAt { get { throw null; } } + public string LastModifiedBy { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.CreatedByType? LastModifiedByType { get { throw null; } } + } + public partial class SystemService + { + internal SystemService() { } + public string PublicIpAddress { get { throw null; } } + public string SystemServiceType { get { throw null; } } + public string Version { get { throw null; } } + } + public partial class TerminationConfiguration + { + public TerminationConfiguration() { } + public Azure.ResourceManager.MachineLearningServices.Models.EarlyTerminationPolicyConfiguration EarlyTerminationPolicyConfiguration { get { throw null; } set { } } + public int? MaxConcurrentRuns { get { throw null; } set { } } + public int? MaxDurationMinutes { get { throw null; } set { } } + public int? MaxTotalRuns { get { throw null; } set { } } + } + public partial class TrialComponent + { + public TrialComponent() { } + public Azure.ResourceManager.MachineLearningServices.Models.CodeConfiguration CodeConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IDictionary DataBindings { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.DistributionConfiguration DistributionConfiguration { get { throw null; } set { } } + public string EnvironmentId { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UnderlyingResourceAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UnderlyingResourceAction(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction Delete { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction Detach { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction left, Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction left, Azure.ResourceManager.MachineLearningServices.Models.UnderlyingResourceAction right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UnitOfMeasure : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UnitOfMeasure(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.UnitOfMeasure OneHour { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.UnitOfMeasure other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.UnitOfMeasure left, Azure.ResourceManager.MachineLearningServices.Models.UnitOfMeasure right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.UnitOfMeasure (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.UnitOfMeasure left, Azure.ResourceManager.MachineLearningServices.Models.UnitOfMeasure right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UpdateWorkspaceQuotas + { + internal UpdateWorkspaceQuotas() { } + public string Id { get { throw null; } } + public long? Limit { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.Status? Status { get { throw null; } } + public string Type { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.QuotaUnit? Unit { get { throw null; } } + } + public partial class UpdateWorkspaceQuotasResult + { + internal UpdateWorkspaceQuotasResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class Usage + { + internal Usage() { } + public string AmlWorkspaceLocation { get { throw null; } } + public long? CurrentValue { get { throw null; } } + public string Id { get { throw null; } } + public long? Limit { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.UsageName Name { get { throw null; } } + public string Type { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.UsageUnit? Unit { get { throw null; } } + } + public partial class UsageName + { + internal UsageName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UsageUnit : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UsageUnit(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.UsageUnit Count { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.UsageUnit other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.UsageUnit left, Azure.ResourceManager.MachineLearningServices.Models.UsageUnit right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.UsageUnit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.UsageUnit left, Azure.ResourceManager.MachineLearningServices.Models.UsageUnit right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UserAccountCredentials + { + public UserAccountCredentials(string adminUserName) { } + public string AdminUserName { get { throw null; } set { } } + public string AdminUserPassword { get { throw null; } set { } } + public string AdminUserSshPublicKey { get { throw null; } set { } } + } + public partial class UserAssignedIdentity + { + public UserAssignedIdentity() { } + public string ClientId { get { throw null; } } + public string PrincipalId { get { throw null; } } + public string TenantId { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VariantType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VariantType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.VariantType Control { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.VariantType Treatment { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.VariantType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.VariantType left, Azure.ResourceManager.MachineLearningServices.Models.VariantType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.VariantType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.VariantType left, Azure.ResourceManager.MachineLearningServices.Models.VariantType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class VirtualMachine : Azure.ResourceManager.MachineLearningServices.Models.Compute + { + public VirtualMachine() { } + public Azure.ResourceManager.MachineLearningServices.Models.VirtualMachineProperties Properties { get { throw null; } set { } } + } + public partial class VirtualMachineImage + { + public VirtualMachineImage(string id) { } + public string Id { get { throw null; } set { } } + } + public partial class VirtualMachineProperties + { + public VirtualMachineProperties() { } + public string Address { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.VirtualMachineSshCredentials AdministratorAccount { get { throw null; } set { } } + public int? SshPort { get { throw null; } set { } } + public string VirtualMachineSize { get { throw null; } set { } } + } + public partial class VirtualMachineSecrets : Azure.ResourceManager.MachineLearningServices.Models.ComputeSecrets + { + internal VirtualMachineSecrets() { } + public Azure.ResourceManager.MachineLearningServices.Models.VirtualMachineSshCredentials AdministratorAccount { get { throw null; } } + } + public partial class VirtualMachineSize + { + internal VirtualMachineSize() { } + public Azure.ResourceManager.MachineLearningServices.Models.EstimatedVMPrices EstimatedVMPrices { get { throw null; } } + public string Family { get { throw null; } } + public int? Gpus { get { throw null; } } + public bool? LowPriorityCapable { get { throw null; } } + public int? MaxResourceVolumeMB { get { throw null; } } + public double? MemoryGB { get { throw null; } } + public string Name { get { throw null; } } + public int? OsVhdSizeMB { get { throw null; } } + public bool? PremiumIO { get { throw null; } } + public int? VCPUs { get { throw null; } } + } + public partial class VirtualMachineSizeListResult + { + internal VirtualMachineSizeListResult() { } + public System.Collections.Generic.IReadOnlyList AmlCompute { get { throw null; } } + } + public partial class VirtualMachineSshCredentials + { + public VirtualMachineSshCredentials() { } + public string Password { get { throw null; } set { } } + public string PrivateKeyData { get { throw null; } set { } } + public string PublicKeyData { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VMPriceOSType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VMPriceOSType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType Linux { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType Windows { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType left, Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType left, Azure.ResourceManager.MachineLearningServices.Models.VMPriceOSType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VmPriority : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VmPriority(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.VmPriority Dedicated { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.VmPriority LowPriority { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.VmPriority other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.VmPriority left, Azure.ResourceManager.MachineLearningServices.Models.VmPriority right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.VmPriority (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.VmPriority left, Azure.ResourceManager.MachineLearningServices.Models.VmPriority right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VMTier : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VMTier(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.VMTier LowPriority { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.VMTier Spot { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.VMTier Standard { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.VMTier other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.VMTier left, Azure.ResourceManager.MachineLearningServices.Models.VMTier right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.VMTier (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.VMTier left, Azure.ResourceManager.MachineLearningServices.Models.VMTier right) { throw null; } + public override string ToString() { throw null; } + } + public partial class VnetConfiguration + { + public VnetConfiguration() { } + public string SubnetName { get { throw null; } set { } } + public string VnetName { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebServiceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebServiceState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearningServices.Models.WebServiceState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.WebServiceState Healthy { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.WebServiceState Transitioning { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.WebServiceState Unhealthy { get { throw null; } } + public static Azure.ResourceManager.MachineLearningServices.Models.WebServiceState Unschedulable { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearningServices.Models.WebServiceState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearningServices.Models.WebServiceState left, Azure.ResourceManager.MachineLearningServices.Models.WebServiceState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearningServices.Models.WebServiceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearningServices.Models.WebServiceState left, Azure.ResourceManager.MachineLearningServices.Models.WebServiceState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class Workspace : Azure.ResourceManager.MachineLearningServices.Models.Resource + { + public Workspace() { } + public bool? AllowPublicAccessWhenBehindVnet { get { throw null; } set { } } + public string ApplicationInsights { get { throw null; } set { } } + public string ContainerRegistry { get { throw null; } set { } } + public System.DateTimeOffset? CreationTime { get { throw null; } } + public string Description { get { throw null; } set { } } + public string DiscoveryUrl { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.EncryptionProperty Encryption { get { throw null; } set { } } + public string FriendlyName { get { throw null; } set { } } + public bool? HbiWorkspace { get { throw null; } set { } } + public string ImageBuildCompute { get { throw null; } set { } } + public string KeyVault { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } + public int? PrivateLinkCount { get { throw null; } } + public Azure.ResourceManager.MachineLearningServices.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string ServiceProvisionedResourceGroup { get { throw null; } } + public System.Collections.Generic.IList SharedPrivateLinkResources { get { throw null; } } + public string StorageAccount { get { throw null; } set { } } + public string WorkspaceId { get { throw null; } } + } + public partial class WorkspaceConnection + { + internal WorkspaceConnection() { } + public string AuthType { get { throw null; } } + public string Category { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public string Target { get { throw null; } } + public string Type { get { throw null; } } + public string Value { get { throw null; } } + } + public partial class WorkspaceConnectionDto + { + public WorkspaceConnectionDto() { } + public string AuthType { get { throw null; } set { } } + public string Category { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Target { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + } + public partial class WorkspaceListResult + { + internal WorkspaceListResult() { } + public string NextLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + } + public partial class WorkspaceSku + { + internal WorkspaceSku() { } + public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LocationInfo { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Locations { get { throw null; } } + public string Name { get { throw null; } } + public string ResourceType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Restrictions { get { throw null; } } + public string Tier { get { throw null; } } + } + public partial class WorkspaceUpdateParameters + { + public WorkspaceUpdateParameters() { } + public string Description { get { throw null; } set { } } + public string FriendlyName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearningServices.Models.Sku Sku { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Azure.ResourceManager.MachineLearningServices.csproj b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Azure.ResourceManager.MachineLearningServices.csproj new file mode 100644 index 000000000000..0286e0fb8c3e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Azure.ResourceManager.MachineLearningServices.csproj @@ -0,0 +1,18 @@ + + + 1.0.0-beta.1 + + Azure management client SDK for Azure resource provider MachineLearningServices. + This is the first beta preview version, so expect incompatible changes in subsequent releases as we improve the product. + + Azure.ResourceManager.MachineLearningServices + azure;management;machinelearning;machinelearningservices;aml;ml + $(RequiredTargetFrameworks) + + + + + + $(NoWarn);AZC0001;CS1591 + + diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesOperations.cs new file mode 100644 index 000000000000..d95e4aa62940 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesOperations.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The AzureMachineLearningWorkspaces service client. + public partial class AzureMachineLearningWorkspacesOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal AzureMachineLearningWorkspacesRestOperations RestClient { get; } + /// Initializes a new instance of AzureMachineLearningWorkspacesOperations for mocking. + protected AzureMachineLearningWorkspacesOperations() + { + } + /// Initializes a new instance of AzureMachineLearningWorkspacesOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal AzureMachineLearningWorkspacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new AzureMachineLearningWorkspacesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Lists all skus with associated features. + /// The cancellation token to use. + public virtual AsyncPageable ListSkusAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("AzureMachineLearningWorkspacesOperations.ListSkus"); + scope.Start(); + try + { + var response = await RestClient.ListSkusAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("AzureMachineLearningWorkspacesOperations.ListSkus"); + scope.Start(); + try + { + var response = await RestClient.ListSkusNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists all skus with associated features. + /// The cancellation token to use. + public virtual Pageable ListSkus(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("AzureMachineLearningWorkspacesOperations.ListSkus"); + scope.Start(); + try + { + var response = RestClient.ListSkus(cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("AzureMachineLearningWorkspacesOperations.ListSkus"); + scope.Start(); + try + { + var response = RestClient.ListSkusNextPage(nextLink, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesRestOperations.cs new file mode 100644 index 000000000000..f15eea53f362 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/AzureMachineLearningWorkspacesRestOperations.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class AzureMachineLearningWorkspacesRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of AzureMachineLearningWorkspacesRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public AzureMachineLearningWorkspacesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListSkusRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/skus", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all skus with associated features. + /// The cancellation token to use. + public async Task> ListSkusAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListSkusRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SkuListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SkuListResult.DeserializeSkuListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all skus with associated features. + /// The cancellation token to use. + public Response ListSkus(CancellationToken cancellationToken = default) + { + using var message = CreateListSkusRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SkuListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SkuListResult.DeserializeSkuListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListSkusNextPageRequest(string nextLink) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all skus with associated features. + /// The URL to the next page of results. + /// The cancellation token to use. + /// is null. + public async Task> ListSkusNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateListSkusNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SkuListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SkuListResult.DeserializeSkuListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all skus with associated features. + /// The URL to the next page of results. + /// The cancellation token to use. + /// is null. + public Response ListSkusNextPage(string nextLink, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateListSkusNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SkuListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SkuListResult.DeserializeSkuListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersOperations.cs new file mode 100644 index 000000000000..6e9c157a5954 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersOperations.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The CodeContainers service client. + public partial class CodeContainersOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal CodeContainersRestOperations RestClient { get; } + /// Initializes a new instance of CodeContainersOperations for mocking. + protected CodeContainersOperations() + { + } + /// Initializes a new instance of CodeContainersOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal CodeContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new CodeContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, CodeContainerResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, CodeContainerResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("CodeContainersOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersRestOperations.cs new file mode 100644 index 000000000000..1a60eb58e45d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeContainersRestOperations.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class CodeContainersRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of CodeContainersRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public CodeContainersRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, CodeContainerResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , or is null. + public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, CodeContainerResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + CodeContainerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeContainerResource.DeserializeCodeContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , or is null. + public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, CodeContainerResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + CodeContainerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeContainerResource.DeserializeCodeContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeContainerResource.DeserializeCodeContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeContainerResource.DeserializeCodeContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List containers. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List containers. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeContainerResourceArmPaginatedResult.DeserializeCodeContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsOperations.cs new file mode 100644 index 000000000000..39df493fdd5c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsOperations.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The CodeVersions service client. + public partial class CodeVersionsOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal CodeVersionsRestOperations RestClient { get; } + /// Initializes a new instance of CodeVersionsOperations for mocking. + protected CodeVersionsOperations() + { + } + /// Initializes a new instance of CodeVersionsOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal CodeVersionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new CodeVersionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, version, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, version, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, version, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, version, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List versions. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public virtual AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(name, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, name, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List versions. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public virtual Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(name, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("CodeVersionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, name, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsRestOperations.cs new file mode 100644 index 000000000000..625f76955ad7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/CodeVersionsRestOperations.cs @@ -0,0 +1,578 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class CodeVersionsRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of CodeVersionsRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public CodeVersionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + CodeVersionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeVersionResource.DeserializeCodeVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + public Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, CodeVersionResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + CodeVersionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeVersionResource.DeserializeCodeVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string version, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeVersionResource.DeserializeCodeVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeVersionResource.DeserializeCodeVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string version, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string name, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/codes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List versions. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List versions. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public Response List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List versions. + /// The URL to the next page of results. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , , or is null. + public async Task> ListNextPageAsync(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List versions. + /// The URL to the next page of results. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , , or is null. + public Response ListNextPage(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CodeVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CodeVersionResourceArmPaginatedResult.DeserializeCodeVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersOperations.cs new file mode 100644 index 000000000000..3f9dbb97264f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersOperations.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The DataContainers service client. + public partial class DataContainersOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal DataContainersRestOperations RestClient { get; } + /// Initializes a new instance of DataContainersOperations for mocking. + protected DataContainersOperations() + { + } + /// Initializes a new instance of DataContainersOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal DataContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new DataContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, DataContainerResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, DataContainerResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataContainersOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersRestOperations.cs new file mode 100644 index 000000000000..a11622e7ab52 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataContainersRestOperations.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class DataContainersRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of DataContainersRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public DataContainersRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, DataContainerResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , or is null. + public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, DataContainerResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataContainerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataContainerResource.DeserializeDataContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , or is null. + public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, DataContainerResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataContainerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataContainerResource.DeserializeDataContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataContainerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataContainerResource.DeserializeDataContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataContainerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataContainerResource.DeserializeDataContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/data", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List containers. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List containers. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataContainerResourceArmPaginatedResult.DeserializeDataContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsOperations.cs new file mode 100644 index 000000000000..612dd55b3554 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsOperations.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The DataVersions service client. + public partial class DataVersionsOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal DataVersionsRestOperations RestClient { get; } + /// Initializes a new instance of DataVersionsOperations for mocking. + protected DataVersionsOperations() + { + } + /// Initializes a new instance of DataVersionsOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal DataVersionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new DataVersionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, version, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, version, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, version, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, version, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List versions. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public virtual AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(name, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, name, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List versions. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public virtual Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(name, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DataVersionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, name, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsRestOperations.cs new file mode 100644 index 000000000000..9749162891ca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DataVersionsRestOperations.cs @@ -0,0 +1,578 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class DataVersionsRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of DataVersionsRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public DataVersionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataVersionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataVersionResource.DeserializeDataVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + public Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, DataVersionResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataVersionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataVersionResource.DeserializeDataVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string version, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataVersionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataVersionResource.DeserializeDataVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataVersionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataVersionResource.DeserializeDataVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string version, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string name, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/data/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List versions. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataVersionResourceArmPaginatedResult.DeserializeDataVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List versions. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public Response List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataVersionResourceArmPaginatedResult.DeserializeDataVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List versions. + /// The URL to the next page of results. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , , or is null. + public async Task> ListNextPageAsync(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DataVersionResourceArmPaginatedResult.DeserializeDataVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List versions. + /// The URL to the next page of results. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , , or is null. + public Response ListNextPage(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DataVersionResourceArmPaginatedResult.DeserializeDataVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresOperations.cs new file mode 100644 index 000000000000..e0658dfee558 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresOperations.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The Datastores service client. + public partial class DatastoresOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal DatastoresRestOperations RestClient { get; } + /// Initializes a new instance of DatastoresOperations for mocking. + protected DatastoresOperations() + { + } + /// Initializes a new instance of DatastoresOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal DatastoresOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new DatastoresRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Delete datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Datastore entity to create or update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Datastore entity to create or update. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get datastore secrets. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> ListSecretsAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.ListSecrets"); + scope.Start(); + try + { + return await RestClient.ListSecretsAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get datastore secrets. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response ListSecrets(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.ListSecrets"); + scope.Start(); + try + { + return RestClient.ListSecrets(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List datastores. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// Filter down to the workspace default datastore. + /// Names of datastores to return. + /// Text to search for in the datastore names. + /// Order by property (createdtime | modifiedtime | name). + /// Order by property in ascending order. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List datastores. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// Filter down to the workspace default datastore. + /// Names of datastores to return. + /// Text to search for in the datastore names. + /// Order by property (createdtime | modifiedtime | name). + /// Order by property in ascending order. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("DatastoresOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresRestOperations.cs new file mode 100644 index 000000000000..63c0d0c7f215 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/DatastoresRestOperations.cs @@ -0,0 +1,670 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class DatastoresRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of DatastoresRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public DatastoresRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken, int? count, bool? isDefault, IEnumerable names, string searchText, string orderBy, bool? orderByAsc) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/datastores", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + if (count != null) + { + uri.AppendQuery("count", count.Value, true); + } + if (isDefault != null) + { + uri.AppendQuery("isDefault", isDefault.Value, true); + } + if (names != null) + { + uri.AppendQueryDelimited("names", names, ",", true); + } + if (searchText != null) + { + uri.AppendQuery("searchText", searchText, true); + } + if (orderBy != null) + { + uri.AppendQuery("orderBy", orderBy, true); + } + if (orderByAsc != null) + { + uri.AppendQuery("orderByAsc", orderByAsc.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List datastores. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// Filter down to the workspace default datastore. + /// Names of datastores to return. + /// Text to search for in the datastore names. + /// Order by property (createdtime | modifiedtime | name). + /// Order by property in ascending order. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatastorePropertiesResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatastorePropertiesResourceArmPaginatedResult.DeserializeDatastorePropertiesResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List datastores. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// Filter down to the workspace default datastore. + /// Names of datastores to return. + /// Text to search for in the datastore names. + /// Order by property (createdtime | modifiedtime | name). + /// Order by property in ascending order. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatastorePropertiesResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatastorePropertiesResourceArmPaginatedResult.DeserializeDatastorePropertiesResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/datastores/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/datastores/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatastorePropertiesResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatastorePropertiesResource.DeserializeDatastorePropertiesResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatastorePropertiesResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatastorePropertiesResource.DeserializeDatastorePropertiesResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/datastores/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + return message; + } + + /// Create or update datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Datastore entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DatastorePropertiesResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatastorePropertiesResource.DeserializeDatastorePropertiesResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create or update datastore. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Datastore entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, DatastorePropertiesResource body, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (body == null) + { + throw new ArgumentNullException(nameof(body)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DatastorePropertiesResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatastorePropertiesResource.DeserializeDatastorePropertiesResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListSecretsRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/datastores/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listSecrets", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get datastore secrets. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListSecretsAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListSecretsRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatastoreCredentials value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatastoreCredentials.DeserializeDatastoreCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get datastore secrets. + /// Datastore name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response ListSecrets(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListSecretsRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatastoreCredentials value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatastoreCredentials.DeserializeDatastoreCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken, int? count, bool? isDefault, IEnumerable names, string searchText, string orderBy, bool? orderByAsc) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List datastores. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// Filter down to the workspace default datastore. + /// Names of datastores to return. + /// Text to search for in the datastore names. + /// Order by property (createdtime | modifiedtime | name). + /// Order by property in ascending order. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatastorePropertiesResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatastorePropertiesResourceArmPaginatedResult.DeserializeDatastorePropertiesResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List datastores. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// Filter down to the workspace default datastore. + /// Names of datastores to return. + /// Text to search for in the datastore names. + /// Order by property (createdtime | modifiedtime | name). + /// Order by property in ascending order. + /// The cancellation token to use. + /// , , or is null. + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count, isDefault, names, searchText, orderBy, orderByAsc); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatastorePropertiesResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatastorePropertiesResourceArmPaginatedResult.DeserializeDatastorePropertiesResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersOperations.cs new file mode 100644 index 000000000000..ffc1514ff681 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersOperations.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The EnvironmentContainers service client. + public partial class EnvironmentContainersOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal EnvironmentContainersRestOperations RestClient { get; } + /// Initializes a new instance of EnvironmentContainersOperations for mocking. + protected EnvironmentContainersOperations() + { + } + /// Initializes a new instance of EnvironmentContainersOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal EnvironmentContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new EnvironmentContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentContainersOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersRestOperations.cs new file mode 100644 index 000000000000..9d06c7e941da --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentContainersRestOperations.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class EnvironmentContainersRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of EnvironmentContainersRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public EnvironmentContainersRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , or is null. + public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + EnvironmentContainerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentContainerResource.DeserializeEnvironmentContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , or is null. + public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, EnvironmentContainerResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + EnvironmentContainerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentContainerResource.DeserializeEnvironmentContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentContainerResource.DeserializeEnvironmentContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentContainerResource.DeserializeEnvironmentContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/environments", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List containers. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List containers. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentContainerResourceArmPaginatedResult.DeserializeEnvironmentContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsOperations.cs new file mode 100644 index 000000000000..ddb303b13abe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsOperations.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The EnvironmentSpecificationVersions service client. + public partial class EnvironmentSpecificationVersionsOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal EnvironmentSpecificationVersionsRestOperations RestClient { get; } + /// Initializes a new instance of EnvironmentSpecificationVersionsOperations for mocking. + protected EnvironmentSpecificationVersionsOperations() + { + } + /// Initializes a new instance of EnvironmentSpecificationVersionsOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal EnvironmentSpecificationVersionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new EnvironmentSpecificationVersionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// The String to use. + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The EnvironmentSpecificationVersionResource to use. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, version, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// The String to use. + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The EnvironmentSpecificationVersionResource to use. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, version, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, version, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, version, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The String to use. + /// The String to use. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public virtual AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(name, resourceGroupName, workspaceName, orderby, top, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, name, resourceGroupName, workspaceName, orderby, top, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The String to use. + /// The String to use. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public virtual Pageable List(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(name, resourceGroupName, workspaceName, orderby, top, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("EnvironmentSpecificationVersionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, name, resourceGroupName, workspaceName, orderby, top, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsRestOperations.cs new file mode 100644 index 000000000000..3aa4859269e6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/EnvironmentSpecificationVersionsRestOperations.cs @@ -0,0 +1,588 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class EnvironmentSpecificationVersionsRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of EnvironmentSpecificationVersionsRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public EnvironmentSpecificationVersionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// The String to use. + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The EnvironmentSpecificationVersionResource to use. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + EnvironmentSpecificationVersionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// The String to use. + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The EnvironmentSpecificationVersionResource to use. + /// The cancellation token to use. + /// , , , or is null. + public Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, EnvironmentSpecificationVersionResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + EnvironmentSpecificationVersionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string version, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentSpecificationVersionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentSpecificationVersionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string version, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string name, string resourceGroupName, string workspaceName, string orderby, string top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", apiVersion, true); + if (orderby != null) + { + uri.AppendQuery("$orderby", orderby, true); + } + if (top != null) + { + uri.AppendQuery("$top", top, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The String to use. + /// The String to use. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListAsync(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(name, resourceGroupName, workspaceName, orderby, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentSpecificationVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentSpecificationVersionResourceArmPaginatedResult.DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The String to use. + /// The String to use. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public Response List(string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(name, resourceGroupName, workspaceName, orderby, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentSpecificationVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentSpecificationVersionResourceArmPaginatedResult.DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string name, string resourceGroupName, string workspaceName, string orderby, string top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// The URL to the next page of results. + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The String to use. + /// The String to use. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , , or is null. + public async Task> ListNextPageAsync(string nextLink, string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, orderby, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EnvironmentSpecificationVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EnvironmentSpecificationVersionResourceArmPaginatedResult.DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// The URL to the next page of results. + /// The String to use. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The String to use. + /// The String to use. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , , or is null. + public Response ListNextPage(string nextLink, string name, string resourceGroupName, string workspaceName, string orderby = null, string top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, orderby, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EnvironmentSpecificationVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EnvironmentSpecificationVersionResourceArmPaginatedResult.DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsOperations.cs new file mode 100644 index 000000000000..e5d471e9d025 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsOperations.cs @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The Jobs service client. + public partial class JobsOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal JobsRestOperations RestClient { get; } + /// Initializes a new instance of JobsOperations for mocking. + protected JobsOperations() + { + } + /// Initializes a new instance of JobsOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal JobsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new JobsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates and executes a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Job definition object. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, JobBaseResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(id, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates and executes a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Job definition object. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, JobBaseResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(id, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a Job by name/id. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a Job by name/id. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(id, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(id, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancels a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task CancelAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.Cancel"); + scope.Start(); + try + { + return await RestClient.CancelAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Cancels a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Cancel(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.Cancel"); + scope.Start(); + try + { + return RestClient.Cancel(id, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Polls a Job operation. + /// The name and identifier for the Job. + /// The operation ID of the async operation to be polled. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task PollAsync(string id, string operationId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.Poll"); + scope.Start(); + try + { + return await RestClient.PollAsync(id, operationId, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Polls a Job operation. + /// The name and identifier for the Job. + /// The operation ID of the async operation to be polled. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Poll(string id, string operationId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.Poll"); + scope.Start(); + try + { + return RestClient.Poll(id, operationId, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists Jobs in the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists Jobs in the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("JobsOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsRestOperations.cs new file mode 100644 index 000000000000..f2249fd2bfbd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/JobsRestOperations.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class JobsRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of JobsRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public JobsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string id, string resourceGroupName, string workspaceName, JobBaseResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Creates and executes a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Job definition object. + /// The cancellation token to use. + /// , , or is null. + public async Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, JobBaseResource body = null, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(id, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + JobBaseResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = JobBaseResource.DeserializeJobBaseResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates and executes a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Job definition object. + /// The cancellation token to use. + /// , , or is null. + public Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, JobBaseResource body = null, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(id, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + JobBaseResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = JobBaseResource.DeserializeJobBaseResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string id, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets a Job by name/id. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(id, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobBaseResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = JobBaseResource.DeserializeJobBaseResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a Job by name/id. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(id, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobBaseResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = JobBaseResource.DeserializeJobBaseResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string id, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Deletes a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(id, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(id, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/jobs", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists Jobs in the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobBaseResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = JobBaseResourceArmPaginatedResult.DeserializeJobBaseResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists Jobs in the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobBaseResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = JobBaseResourceArmPaginatedResult.DeserializeJobBaseResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCancelRequest(string id, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Cancels a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task CancelAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCancelRequest(id, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Cancels a Job. + /// The name and identifier for the Job. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Cancel(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCancelRequest(id, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePollRequest(string id, string operationId, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/operationresults/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Polls a Job operation. + /// The name and identifier for the Job. + /// The operation ID of the async operation to be polled. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task PollAsync(string id, string operationId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (operationId == null) + { + throw new ArgumentNullException(nameof(operationId)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreatePollRequest(id, operationId, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Polls a Job operation. + /// The name and identifier for the Job. + /// The operation ID of the async operation to be polled. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Poll(string id, string operationId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (operationId == null) + { + throw new ArgumentNullException(nameof(operationId)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreatePollRequest(id, operationId, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists Jobs in the workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobBaseResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = JobBaseResourceArmPaginatedResult.DeserializeJobBaseResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists Jobs in the workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobBaseResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = JobBaseResourceArmPaginatedResult.DeserializeJobBaseResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsOperations.cs new file mode 100644 index 000000000000..2f12018412b6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsOperations.cs @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The LabelingJobs service client. + public partial class LabelingJobsOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal LabelingJobsRestOperations RestClient { get; } + /// Initializes a new instance of LabelingJobsOperations for mocking. + protected LabelingJobsOperations() + { + } + /// Initializes a new instance of LabelingJobsOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal LabelingJobsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new LabelingJobsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Creates or updates a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// LabelingJob definition object. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, LabelingJobResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(id, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// LabelingJob definition object. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, LabelingJobResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(id, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a labeling job by name/id. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + public virtual async Task> GetAsync(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets a labeling job by name/id. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + public virtual Response Get(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(id, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Pause a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task PauseAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Pause"); + scope.Start(); + try + { + return await RestClient.PauseAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Pause a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Pause(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Pause"); + scope.Start(); + try + { + return RestClient.Pause(id, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Resume a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task ResumeAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Resume"); + scope.Start(); + try + { + return await RestClient.ResumeAsync(id, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Resume a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Resume(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.Resume"); + scope.Start(); + try + { + return RestClient.Resume(id, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Export labels from a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The desired format of export operation. + /// The cancellation token to use. + public virtual async Task ExportLabelsAsync(string id, string resourceGroupName, string workspaceName, ExportFormatType? body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.ExportLabels"); + scope.Start(); + try + { + return await RestClient.ExportLabelsAsync(id, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Export labels from a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The desired format of export operation. + /// The cancellation token to use. + public virtual Response ExportLabels(string id, string resourceGroupName, string workspaceName, ExportFormatType? body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.ExportLabels"); + scope.Start(); + try + { + return RestClient.ExportLabels(id, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get export summary from a labeling job. + /// The name and identifier for the LabelingJob. + /// The unique identifier of Export Labels operation. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetExportSummaryAsync(string id, Guid exportId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.GetExportSummary"); + scope.Start(); + try + { + return await RestClient.GetExportSummaryAsync(id, exportId, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get export summary from a labeling job. + /// The name and identifier for the LabelingJob. + /// The unique identifier of Export Labels operation. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response GetExportSummary(string id, Guid exportId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.GetExportSummary"); + scope.Start(); + try + { + return RestClient.GetExportSummary(id, exportId, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists labeling jobs in the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, count, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, count, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists labeling jobs in the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, count, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("LabelingJobsOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, count, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsRestOperations.cs new file mode 100644 index 000000000000..52dda109ecd8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LabelingJobsRestOperations.cs @@ -0,0 +1,906 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class LabelingJobsRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of LabelingJobsRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public LabelingJobsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string id, string resourceGroupName, string workspaceName, LabelingJobResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Creates or updates a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// LabelingJob definition object. + /// The cancellation token to use. + /// , , or is null. + public async Task> CreateOrUpdateAsync(string id, string resourceGroupName, string workspaceName, LabelingJobResource body = null, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(id, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + LabelingJobResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LabelingJobResource.DeserializeLabelingJobResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// LabelingJob definition object. + /// The cancellation token to use. + /// , , or is null. + public Response CreateOrUpdate(string id, string resourceGroupName, string workspaceName, LabelingJobResource body = null, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(id, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + LabelingJobResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LabelingJobResource.DeserializeLabelingJobResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions, bool? includeLabelCategories) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", apiVersion, true); + if (includeJobInstructions != null) + { + uri.AppendQuery("includeJobInstructions", includeJobInstructions.Value, true); + } + if (includeLabelCategories != null) + { + uri.AppendQuery("includeLabelCategories", includeLabelCategories.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets a labeling job by name/id. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LabelingJobResource.DeserializeLabelingJobResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets a labeling job by name/id. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Boolean value to indicate whether to include JobInstructions in response. + /// Boolean value to indicate Whether to include LabelCategories in response. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string id, string resourceGroupName, string workspaceName, bool? includeJobInstructions = null, bool? includeLabelCategories = null, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(id, resourceGroupName, workspaceName, includeJobInstructions, includeLabelCategories); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LabelingJobResource.DeserializeLabelingJobResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string id, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(id, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(id, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken, int? count) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + if (count != null) + { + uri.AppendQuery("count", count.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists labeling jobs in the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists labeling jobs in the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePauseRequest(string id, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/pause", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Pause a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task PauseAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreatePauseRequest(id, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Pause a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Pause(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreatePauseRequest(id, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateResumeRequest(string id, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/resume", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Resume a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task ResumeAsync(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateResumeRequest(id, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Resume a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Resume(string id, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateResumeRequest(id, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateExportLabelsRequest(string id, string resourceGroupName, string workspaceName, ExportFormatType? body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/exportLabels", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStringValue(body.Value.ToString()); + request.Content = content; + } + return message; + } + + /// Export labels from a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The desired format of export operation. + /// The cancellation token to use. + /// , , or is null. + public async Task ExportLabelsAsync(string id, string resourceGroupName, string workspaceName, ExportFormatType? body = null, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateExportLabelsRequest(id, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Export labels from a labeling job. + /// The name and identifier for the LabelingJob. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The desired format of export operation. + /// The cancellation token to use. + /// , , or is null. + public Response ExportLabels(string id, string resourceGroupName, string workspaceName, ExportFormatType? body = null, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateExportLabelsRequest(id, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetExportSummaryRequest(string id, Guid exportId, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/labelingJobs/", false); + uri.AppendPath(id, true); + uri.AppendPath("/exportLabels/", false); + uri.AppendPath(exportId, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get export summary from a labeling job. + /// The name and identifier for the LabelingJob. + /// The unique identifier of Export Labels operation. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetExportSummaryAsync(string id, Guid exportId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetExportSummaryRequest(id, exportId, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExportSummaryResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExportSummaryResource.DeserializeExportSummaryResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get export summary from a labeling job. + /// The name and identifier for the LabelingJob. + /// The unique identifier of Export Labels operation. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response GetExportSummary(string id, Guid exportId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetExportSummaryRequest(id, exportId, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExportSummaryResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExportSummaryResource.DeserializeExportSummaryResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken, int? count) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists labeling jobs in the workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists labeling jobs in the workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Number of labeling jobs to return. + /// The cancellation token to use. + /// , , or is null. + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LabelingJobResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LabelingJobResourceArmPaginatedResult.DeserializeLabelingJobResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesOperations.cs new file mode 100644 index 000000000000..361047d9d570 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesOperations.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The LinkedServices service client. + public partial class LinkedServicesOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal LinkedServicesRestOperations RestClient { get; } + /// Initializes a new instance of LinkedServicesOperations for mocking. + protected LinkedServicesOperations() + { + } + /// Initializes a new instance of LinkedServicesOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal LinkedServicesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new LinkedServicesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// List all linked services under an AML workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.List"); + scope.Start(); + try + { + return await RestClient.ListAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all linked services under an AML workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.List"); + scope.Start(); + try + { + return RestClient.List(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a new linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The object for creating or updating a linked service. + /// The cancellation token to use. + public virtual async Task> CreateAsync(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Create"); + scope.Start(); + try + { + return await RestClient.CreateAsync(resourceGroupName, workspaceName, linkName, parameters, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a new linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The object for creating or updating a linked service. + /// The cancellation token to use. + public virtual Response Create(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Create"); + scope.Start(); + try + { + return RestClient.Create(resourceGroupName, workspaceName, linkName, parameters, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the detail of a linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(resourceGroupName, workspaceName, linkName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the detail of a linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The cancellation token to use. + public virtual Response Get(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(resourceGroupName, workspaceName, linkName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(resourceGroupName, workspaceName, linkName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The cancellation token to use. + public virtual Response Delete(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LinkedServicesOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(resourceGroupName, workspaceName, linkName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesRestOperations.cs new file mode 100644 index 000000000000..d275f55a11b7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/LinkedServicesRestOperations.cs @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class LinkedServicesRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of LinkedServicesRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public LinkedServicesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/linkedServices", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all linked services under an AML workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LinkedServiceList.DeserializeLinkedServiceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List all linked services under an AML workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LinkedServiceList.DeserializeLinkedServiceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/linkedServices/", false); + uri.AppendPath(linkName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(parameters); + request.Content = content; + return message; + } + + /// Add a new linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The object for creating or updating a linked service. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateAsync(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (linkName == null) + { + throw new ArgumentNullException(nameof(linkName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateCreateRequest(resourceGroupName, workspaceName, linkName, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LinkedServiceResponse.DeserializeLinkedServiceResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Add a new linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The object for creating or updating a linked service. + /// The cancellation token to use. + /// , , , or is null. + public Response Create(string resourceGroupName, string workspaceName, string linkName, LinkedServiceRequest parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (linkName == null) + { + throw new ArgumentNullException(nameof(linkName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateCreateRequest(resourceGroupName, workspaceName, linkName, parameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LinkedServiceResponse.DeserializeLinkedServiceResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName, string linkName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/linkedServices/", false); + uri.AppendPath(linkName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get the detail of a linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (linkName == null) + { + throw new ArgumentNullException(nameof(linkName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, linkName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LinkedServiceResponse.DeserializeLinkedServiceResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get the detail of a linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (linkName == null) + { + throw new ArgumentNullException(nameof(linkName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, linkName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedServiceResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LinkedServiceResponse.DeserializeLinkedServiceResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string resourceGroupName, string workspaceName, string linkName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/linkedServices/", false); + uri.AppendPath(linkName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete a linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (linkName == null) + { + throw new ArgumentNullException(nameof(linkName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, linkName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete a linked service. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the linked workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string resourceGroupName, string workspaceName, string linkName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (linkName == null) + { + throw new ArgumentNullException(nameof(linkName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, linkName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateHeaders.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..343c6494dc07 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateHeaders.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal class MachineLearningComputeCreateOrUpdateHeaders + { + private readonly Response _response; + public MachineLearningComputeCreateOrUpdateHeaders(Response response) + { + _response = response; + } + /// URI to poll for asynchronous operation status. + public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateOperation.cs new file mode 100644 index 000000000000..74d037d55f1b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeCreateOrUpdateOperation.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// 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. + public partial class MachineLearningComputeCreateOrUpdateOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal MachineLearningComputeCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "MachineLearningComputeCreateOrUpdateOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override ComputeResource Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + ComputeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ComputeResource.DeserializeComputeResource(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ComputeResource.DeserializeComputeResource(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteHeaders.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteHeaders.cs new file mode 100644 index 000000000000..a9c1ff80d2bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteHeaders.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal class MachineLearningComputeDeleteHeaders + { + private readonly Response _response; + public MachineLearningComputeDeleteHeaders(Response response) + { + _response = response; + } + /// URI to poll for asynchronous operation status. + public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null; + /// URI to poll for asynchronous operation result. + public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteOperation.cs new file mode 100644 index 000000000000..55e66647e0bb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeDeleteOperation.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// Deletes specified Machine Learning compute. + public partial class MachineLearningComputeDeleteOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal MachineLearningComputeDeleteOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "MachineLearningComputeDeleteOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override Response Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + Response IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + return response; + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + return await new ValueTask(response).ConfigureAwait(false); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeOperations.cs new file mode 100644 index 000000000000..107cdcfa0305 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeOperations.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The MachineLearningCompute service client. + public partial class MachineLearningComputeOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal MachineLearningComputeRestOperations RestClient { get; } + /// Initializes a new instance of MachineLearningComputeOperations for mocking. + protected MachineLearningComputeOperations() + { + } + /// Initializes a new instance of MachineLearningComputeOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal MachineLearningComputeOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new MachineLearningComputeRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual Response Get(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(resourceGroupName, workspaceName, computeName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual async Task> ListNodesAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListNodes"); + scope.Start(); + try + { + return await RestClient.ListNodesAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual Response ListNodes(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListNodes"); + scope.Start(); + try + { + return RestClient.ListNodes(resourceGroupName, workspaceName, computeName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual async Task> ListKeysAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListKeys"); + scope.Start(); + try + { + return await RestClient.ListKeysAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual Response ListKeys(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListKeys"); + scope.Start(); + try + { + return RestClient.ListKeys(resourceGroupName, workspaceName, computeName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a start action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual async Task StartAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Start"); + scope.Start(); + try + { + return await RestClient.StartAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a start action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual Response Start(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Start"); + scope.Start(); + try + { + return RestClient.Start(resourceGroupName, workspaceName, computeName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a stop action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual async Task StopAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Stop"); + scope.Start(); + try + { + return await RestClient.StopAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a stop action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual Response Stop(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Stop"); + scope.Start(); + try + { + return RestClient.Stop(resourceGroupName, workspaceName, computeName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a restart action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual async Task RestartAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Restart"); + scope.Start(); + try + { + return await RestClient.RestartAsync(resourceGroupName, workspaceName, computeName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Posts a restart action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + public virtual Response Restart(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.Restart"); + scope.Start(); + try + { + return RestClient.Restart(resourceGroupName, workspaceName, computeName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets computes in specified workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.ListByWorkspaceAsync(resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.ListByWorkspaceNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Gets computes in specified workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public virtual Pageable ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListByWorkspace"); + scope.Start(); + try + { + var response = RestClient.ListByWorkspace(resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.ListByWorkspace"); + scope.Start(); + try + { + var response = RestClient.ListByWorkspaceNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// 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. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Payload with Machine Learning compute definition. + /// The cancellation token to use. + /// , , , or is null. + public virtual async Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartCreateOrUpdate"); + scope.Start(); + try + { + var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, cancellationToken).ConfigureAwait(false); + return new MachineLearningComputeCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// 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. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Payload with Machine Learning compute definition. + /// The cancellation token to use. + /// , , , or is null. + public virtual MachineLearningComputeCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartCreateOrUpdate"); + scope.Start(); + try + { + var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, workspaceName, computeName, parameters, cancellationToken); + return new MachineLearningComputeCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Additional parameters for cluster update. + /// The cancellation token to use. + /// , , , or is null. + public virtual async Task StartUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartUpdate"); + scope.Start(); + try + { + var originalResponse = await RestClient.UpdateAsync(resourceGroupName, workspaceName, computeName, parameters, cancellationToken).ConfigureAwait(false); + return new MachineLearningComputeUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Additional parameters for cluster update. + /// The cancellation token to use. + /// , , , or is null. + public virtual MachineLearningComputeUpdateOperation StartUpdate(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartUpdate"); + scope.Start(); + try + { + var originalResponse = RestClient.Update(resourceGroupName, workspaceName, computeName, parameters, cancellationToken); + return new MachineLearningComputeUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateUpdateRequest(resourceGroupName, workspaceName, computeName, parameters).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes specified Machine Learning compute. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. + /// The cancellation token to use. + /// , , or is null. + public virtual async Task StartDeleteAsync(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartDelete"); + scope.Start(); + try + { + var originalResponse = await RestClient.DeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, cancellationToken).ConfigureAwait(false); + return new MachineLearningComputeDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes specified Machine Learning compute. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. + /// The cancellation token to use. + /// , , or is null. + public virtual MachineLearningComputeDeleteOperation StartDelete(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var scope = _clientDiagnostics.CreateScope("MachineLearningComputeOperations.StartDelete"); + scope.Start(); + try + { + var originalResponse = RestClient.Delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, cancellationToken); + return new MachineLearningComputeDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeRestOperations.cs new file mode 100644 index 000000000000..746f7610a82a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeRestOperations.cs @@ -0,0 +1,1071 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class MachineLearningComputeRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of MachineLearningComputeRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public MachineLearningComputeRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets computes in specified workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public async Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PaginatedComputeResourcesList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PaginatedComputeResourcesList.DeserializePaginatedComputeResourcesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets computes in specified workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public Response ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PaginatedComputeResourcesList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PaginatedComputeResourcesList.DeserializePaginatedComputeResourcesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComputeResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ComputeResource.DeserializeComputeResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComputeResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ComputeResource.DeserializeComputeResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(parameters); + request.Content = content; + return message; + } + + /// 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. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Payload with Machine Learning compute definition. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateOrUpdateAsync(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new MachineLearningComputeCreateOrUpdateHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + case 201: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// 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. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Payload with Machine Learning compute definition. + /// The cancellation token to use. + /// , , , or is null. + public ResponseWithHeaders CreateOrUpdate(string resourceGroupName, string workspaceName, string computeName, ComputeResource parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, computeName, parameters); + _pipeline.Send(message, cancellationToken); + var headers = new MachineLearningComputeCreateOrUpdateHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + case 201: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(parameters); + request.Content = content; + return message; + } + + /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Additional parameters for cluster update. + /// The cancellation token to use. + /// , , , or is null. + public async Task UpdateAsync(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateUpdateRequest(resourceGroupName, workspaceName, computeName, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Additional parameters for cluster update. + /// The cancellation token to use. + /// , , , or is null. + public Response Update(string resourceGroupName, string workspaceName, string computeName, ClusterUpdateParameters parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateUpdateRequest(resourceGroupName, workspaceName, computeName, parameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", apiVersion, true); + uri.AppendQuery("underlyingResourceAction", underlyingResourceAction.ToString(), true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Deletes specified Machine Learning compute. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. + /// The cancellation token to use. + /// , , or is null. + public async Task> DeleteAsync(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new MachineLearningComputeDeleteHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + case 202: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes specified Machine Learning compute. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. + /// The cancellation token to use. + /// , , or is null. + public ResponseWithHeaders Delete(string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, computeName, underlyingResourceAction); + _pipeline.Send(message, cancellationToken); + var headers = new MachineLearningComputeDeleteHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + case 202: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNodesRequest(string resourceGroupName, string workspaceName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendPath("/listNodes", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNodesAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateListNodesRequest(resourceGroupName, workspaceName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AmlComputeNodesInformation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AmlComputeNodesInformation.DeserializeAmlComputeNodesInformation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public Response ListNodes(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateListNodesRequest(resourceGroupName, workspaceName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AmlComputeNodesInformation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AmlComputeNodesInformation.DeserializeAmlComputeNodesInformation(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListKeysRequest(string resourceGroupName, string workspaceName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendPath("/listKeys", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListKeysAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateListKeysRequest(resourceGroupName, workspaceName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComputeSecrets value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ComputeSecrets.DeserializeComputeSecrets(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public Response ListKeys(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateListKeysRequest(resourceGroupName, workspaceName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComputeSecrets value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ComputeSecrets.DeserializeComputeSecrets(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStartRequest(string resourceGroupName, string workspaceName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Posts a start action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public async Task StartAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateStartRequest(resourceGroupName, workspaceName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Posts a start action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public Response Start(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateStartRequest(resourceGroupName, workspaceName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopRequest(string resourceGroupName, string workspaceName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Posts a stop action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public async Task StopAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateStopRequest(resourceGroupName, workspaceName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Posts a stop action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public Response Stop(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateStopRequest(resourceGroupName, workspaceName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateRestartRequest(string resourceGroupName, string workspaceName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendPath("/restart", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Posts a restart action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public async Task RestartAsync(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateRestartRequest(resourceGroupName, workspaceName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Posts a restart action to a compute instance. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning compute. + /// The cancellation token to use. + /// , , or is null. + public Response Restart(string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (computeName == null) + { + throw new ArgumentNullException(nameof(computeName)); + } + + using var message = CreateRestartRequest(resourceGroupName, workspaceName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets computes in specified workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListByWorkspaceNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PaginatedComputeResourcesList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PaginatedComputeResourcesList.DeserializePaginatedComputeResourcesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets computes in specified workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The cancellation token to use. + /// , , or is null. + public Response ListByWorkspaceNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PaginatedComputeResourcesList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PaginatedComputeResourcesList.DeserializePaginatedComputeResourcesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeUpdateOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeUpdateOperation.cs new file mode 100644 index 000000000000..9a0bf19e19c3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningComputeUpdateOperation.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + public partial class MachineLearningComputeUpdateOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal MachineLearningComputeUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "MachineLearningComputeUpdateOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override ComputeResource Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + ComputeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ComputeResource.DeserializeComputeResource(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ComputeResource.DeserializeComputeResource(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateHeaders.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..569d9a2458c9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateHeaders.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal class MachineLearningServiceCreateOrUpdateHeaders + { + private readonly Response _response; + public MachineLearningServiceCreateOrUpdateHeaders(Response response) + { + _response = response; + } + /// URI to poll for asynchronous operation status. + public string AzureAsyncOperation => _response.Headers.TryGetValue("Azure-AsyncOperation", out string value) ? value : null; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateOperation.cs new file mode 100644 index 000000000000..bcd4d2847a8d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceCreateOrUpdateOperation.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// 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. + public partial class MachineLearningServiceCreateOrUpdateOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal MachineLearningServiceCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "MachineLearningServiceCreateOrUpdateOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override ServiceResource Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + ServiceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ServiceResource.DeserializeServiceResource(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ServiceResource.DeserializeServiceResource(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceOperations.cs new file mode 100644 index 000000000000..0fdde181263d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceOperations.cs @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The MachineLearningService service client. + public partial class MachineLearningServiceOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal MachineLearningServiceRestOperations RestClient { get; } + /// Initializes a new instance of MachineLearningServiceOperations for mocking. + protected MachineLearningServiceOperations() + { + } + /// Initializes a new instance of MachineLearningServiceOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal MachineLearningServiceOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new MachineLearningServiceRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Get a Service by name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// Set to True to include Model details. + /// The cancellation token to use. + public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, string serviceName, bool? expand = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(resourceGroupName, workspaceName, serviceName, expand, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a Service by name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// Set to True to include Model details. + /// The cancellation token to use. + public virtual Response Get(string resourceGroupName, string workspaceName, string serviceName, bool? expand = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(resourceGroupName, workspaceName, serviceName, expand, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a specific Service.. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string resourceGroupName, string workspaceName, string serviceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(resourceGroupName, workspaceName, serviceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a specific Service.. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// The cancellation token to use. + public virtual Response Delete(string resourceGroupName, string workspaceName, string serviceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(resourceGroupName, workspaceName, serviceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets services in specified workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The Model Id. + /// The Model name. + /// The object tag. + /// 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 . + /// 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 . + /// runId for model associated with service. + /// Set to True to include Model details. + /// The option to order the response. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.ListByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.ListByWorkspaceAsync(resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.ListByWorkspace"); + scope.Start(); + try + { + var response = await RestClient.ListByWorkspaceNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Gets services in specified workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The Model Id. + /// The Model name. + /// The object tag. + /// 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 . + /// 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 . + /// runId for model associated with service. + /// Set to True to include Model details. + /// The option to order the response. + /// The cancellation token to use. + /// or is null. + public virtual Pageable ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.ListByWorkspace"); + scope.Start(); + try + { + var response = RestClient.ListByWorkspace(resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.ListByWorkspace"); + scope.Start(); + try + { + var response = RestClient.ListByWorkspaceNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// 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. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// The payload that is used to create or update the Service. + /// The cancellation token to use. + /// , , , or is null. + public virtual async Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (serviceName == null) + { + throw new ArgumentNullException(nameof(serviceName)); + } + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.StartCreateOrUpdate"); + scope.Start(); + try + { + var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, workspaceName, serviceName, properties, cancellationToken).ConfigureAwait(false); + return new MachineLearningServiceCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, serviceName, properties).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// 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. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// The payload that is used to create or update the Service. + /// The cancellation token to use. + /// , , , or is null. + public virtual MachineLearningServiceCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (serviceName == null) + { + throw new ArgumentNullException(nameof(serviceName)); + } + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + using var scope = _clientDiagnostics.CreateScope("MachineLearningServiceOperations.StartCreateOrUpdate"); + scope.Start(); + try + { + var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, workspaceName, serviceName, properties, cancellationToken); + return new MachineLearningServiceCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, serviceName, properties).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceRestOperations.cs new file mode 100644 index 000000000000..4e7c0904fb7d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServiceRestOperations.cs @@ -0,0 +1,587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class MachineLearningServiceRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of MachineLearningServiceRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public MachineLearningServiceRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, string workspaceName, string skiptoken, string modelId, string modelName, string tag, string tags, string properties, string runId, bool? expand, OrderString? orderby) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/services", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + if (modelId != null) + { + uri.AppendQuery("modelId", modelId, true); + } + if (modelName != null) + { + uri.AppendQuery("modelName", modelName, true); + } + if (tag != null) + { + uri.AppendQuery("tag", tag, true); + } + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (properties != null) + { + uri.AppendQuery("properties", properties, true); + } + if (runId != null) + { + uri.AppendQuery("runId", runId, true); + } + if (expand != null) + { + uri.AppendQuery("expand", expand.Value, true); + } + if (orderby != null) + { + uri.AppendQuery("orderby", orderby.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets services in specified workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The Model Id. + /// The Model name. + /// The object tag. + /// 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 . + /// 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 . + /// runId for model associated with service. + /// Set to True to include Model details. + /// The option to order the response. + /// The cancellation token to use. + /// or is null. + public async Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PaginatedServiceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PaginatedServiceList.DeserializePaginatedServiceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets services in specified workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The Model Id. + /// The Model name. + /// The object tag. + /// 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 . + /// 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 . + /// runId for model associated with service. + /// Set to True to include Model details. + /// The option to order the response. + /// The cancellation token to use. + /// or is null. + public Response ListByWorkspace(string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PaginatedServiceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PaginatedServiceList.DeserializePaginatedServiceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName, string serviceName, bool? expand) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", apiVersion, true); + if (expand != null) + { + uri.AppendQuery("expand", expand.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get a Service by name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// Set to True to include Model details. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string resourceGroupName, string workspaceName, string serviceName, bool? expand = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (serviceName == null) + { + throw new ArgumentNullException(nameof(serviceName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, serviceName, expand); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceResource.DeserializeServiceResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get a Service by name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// Set to True to include Model details. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string resourceGroupName, string workspaceName, string serviceName, bool? expand = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (serviceName == null) + { + throw new ArgumentNullException(nameof(serviceName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, serviceName, expand); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceResource.DeserializeServiceResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string resourceGroupName, string workspaceName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete a specific Service.. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string resourceGroupName, string workspaceName, string serviceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (serviceName == null) + { + throw new ArgumentNullException(nameof(serviceName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete a specific Service.. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string resourceGroupName, string workspaceName, string serviceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (serviceName == null) + { + throw new ArgumentNullException(nameof(serviceName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/services/", false); + uri.AppendPath(serviceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(properties); + request.Content = content; + return message; + } + + /// 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. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// The payload that is used to create or update the Service. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateOrUpdateAsync(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (serviceName == null) + { + throw new ArgumentNullException(nameof(serviceName)); + } + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, serviceName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + var headers = new MachineLearningServiceCreateOrUpdateHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + case 201: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// 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. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Name of the Azure Machine Learning service. + /// The payload that is used to create or update the Service. + /// The cancellation token to use. + /// , , , or is null. + public ResponseWithHeaders CreateOrUpdate(string resourceGroupName, string workspaceName, string serviceName, CreateServiceRequest properties, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (serviceName == null) + { + throw new ArgumentNullException(nameof(serviceName)); + } + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, serviceName, properties); + _pipeline.Send(message, cancellationToken); + var headers = new MachineLearningServiceCreateOrUpdateHeaders(message.Response); + switch (message.Response.Status) + { + case 200: + case 201: + return ResponseWithHeaders.FromValue(headers, message.Response); + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken, string modelId, string modelName, string tag, string tags, string properties, string runId, bool? expand, OrderString? orderby) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets services in specified workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The Model Id. + /// The Model name. + /// The object tag. + /// 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 . + /// 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 . + /// runId for model associated with service. + /// Set to True to include Model details. + /// The option to order the response. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListByWorkspaceNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PaginatedServiceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PaginatedServiceList.DeserializePaginatedServiceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets services in specified workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// The Model Id. + /// The Model name. + /// The object tag. + /// 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 . + /// 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 . + /// runId for model associated with service. + /// Set to True to include Model details. + /// The option to order the response. + /// The cancellation token to use. + /// , , or is null. + public Response ListByWorkspaceNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, string modelId = null, string modelName = null, string tag = null, string tags = null, string properties = null, string runId = null, bool? expand = null, OrderString? orderby = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, modelId, modelName, tag, tags, properties, runId, expand, orderby); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PaginatedServiceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PaginatedServiceList.DeserializePaginatedServiceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClient.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClient.cs new file mode 100644 index 000000000000..77b290956971 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClient.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// MachineLearningServices service management client. + public class MachineLearningServicesManagementClient + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _subscriptionId; + + /// Initializes a new instance of MachineLearningServicesManagementClient for mocking. + protected MachineLearningServicesManagementClient() + { + } + + /// Initializes a new instance of MachineLearningServicesManagementClient. + /// Azure subscription identifier. + /// The OAuth token for making client requests. + /// The options for configuring the client. + public MachineLearningServicesManagementClient(string subscriptionId, TokenCredential tokenCredential, MachineLearningServicesManagementClientOptions options = null) : this(null, subscriptionId, tokenCredential, options) + { + } + /// Initializes a new instance of MachineLearningServicesManagementClient. + /// server parameter. + /// Azure subscription identifier. + /// The OAuth token for making client requests. + /// The options for configuring the client. + /// is null. + public MachineLearningServicesManagementClient(Uri endpoint, string subscriptionId, TokenCredential tokenCredential, MachineLearningServicesManagementClientOptions options = null) + { + endpoint ??= new Uri("https://management.azure.com"); + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + + options ??= new MachineLearningServicesManagementClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + _pipeline = ManagementPipelineBuilder.Build(tokenCredential, endpoint, options); + _endpoint = endpoint; + _subscriptionId = subscriptionId; + } + + /// Returns an instance of Operations. + public virtual Operations Operations => new Operations(_clientDiagnostics, _pipeline, _endpoint); + + /// Returns an instance of WorkspacesOperations. + public virtual WorkspacesOperations Workspaces => new WorkspacesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of WorkspaceFeaturesOperations. + public virtual WorkspaceFeaturesOperations WorkspaceFeatures => new WorkspaceFeaturesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of UsagesOperations. + public virtual UsagesOperations Usages => new UsagesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of VirtualMachineSizesOperations. + public virtual VirtualMachineSizesOperations VirtualMachineSizes => new VirtualMachineSizesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of QuotasOperations. + public virtual QuotasOperations Quotas => new QuotasOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of MachineLearningComputeOperations. + public virtual MachineLearningComputeOperations MachineLearningCompute => new MachineLearningComputeOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of AzureMachineLearningWorkspacesOperations. + public virtual AzureMachineLearningWorkspacesOperations AzureMachineLearningWorkspaces => new AzureMachineLearningWorkspacesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of PrivateEndpointConnectionsOperations. + public virtual PrivateEndpointConnectionsOperations PrivateEndpointConnections => new PrivateEndpointConnectionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of PrivateLinkResourcesOperations. + public virtual PrivateLinkResourcesOperations PrivateLinkResources => new PrivateLinkResourcesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of LinkedServicesOperations. + public virtual LinkedServicesOperations LinkedServices => new LinkedServicesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of MachineLearningServiceOperations. + public virtual MachineLearningServiceOperations MachineLearningService => new MachineLearningServiceOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of NotebooksOperations. + public virtual NotebooksOperations Notebooks => new NotebooksOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of WorkspaceConnectionsOperations. + public virtual WorkspaceConnectionsOperations WorkspaceConnections => new WorkspaceConnectionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of CodeContainersOperations. + public virtual CodeContainersOperations CodeContainers => new CodeContainersOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of CodeVersionsOperations. + public virtual CodeVersionsOperations CodeVersions => new CodeVersionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of DataContainersOperations. + public virtual DataContainersOperations DataContainers => new DataContainersOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of DatastoresOperations. + public virtual DatastoresOperations Datastores => new DatastoresOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of DataVersionsOperations. + public virtual DataVersionsOperations DataVersions => new DataVersionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of EnvironmentContainersOperations. + public virtual EnvironmentContainersOperations EnvironmentContainers => new EnvironmentContainersOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of EnvironmentSpecificationVersionsOperations. + public virtual EnvironmentSpecificationVersionsOperations EnvironmentSpecificationVersions => new EnvironmentSpecificationVersionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of JobsOperations. + public virtual JobsOperations Jobs => new JobsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of LabelingJobsOperations. + public virtual LabelingJobsOperations LabelingJobs => new LabelingJobsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of ModelContainersOperations. + public virtual ModelContainersOperations ModelContainers => new ModelContainersOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + + /// Returns an instance of ModelVersionsOperations. + public virtual ModelVersionsOperations ModelVersions => new ModelVersionsOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint); + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClientOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClientOptions.cs new file mode 100644 index 000000000000..df51ce55669c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/MachineLearningServicesManagementClientOptions.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// Client options for MachineLearningServices. + public class MachineLearningServicesManagementClientOptions : ClientOptions + { + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersOperations.cs new file mode 100644 index 000000000000..406508fd71e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersOperations.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The ModelContainers service client. + public partial class ModelContainersOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal ModelContainersRestOperations RestClient { get; } + /// Initializes a new instance of ModelContainersOperations for mocking. + protected ModelContainersOperations() + { + } + /// Initializes a new instance of ModelContainersOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal ModelContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new ModelContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, ModelContainerResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, ModelContainerResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List model containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, skiptoken, count, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, skiptoken, count, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List model containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, skiptoken, count, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("ModelContainersOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, skiptoken, count, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersRestOperations.cs new file mode 100644 index 000000000000..b277efaf24e0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelContainersRestOperations.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class ModelContainersRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of ModelContainersRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public ModelContainersRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string skiptoken, int? count) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + if (count != null) + { + uri.AppendQuery("count", count.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List model containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List model containers. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, skiptoken, count); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string resourceGroupName, string workspaceName, ModelContainerResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , or is null. + public async Task> CreateOrUpdateAsync(string name, string resourceGroupName, string workspaceName, ModelContainerResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ModelContainerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelContainerResource.DeserializeModelContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create or update container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Container entity to create or update. + /// The cancellation token to use. + /// , , or is null. + public Response CreateOrUpdate(string name, string resourceGroupName, string workspaceName, ModelContainerResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ModelContainerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelContainerResource.DeserializeModelContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelContainerResource.DeserializeModelContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelContainerResource.DeserializeModelContainerResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete container. + /// Container name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string name, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName, string skiptoken, int? count) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List model containers. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List model containers. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Maximum number of results to return. + /// The cancellation token to use. + /// , , or is null. + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, string skiptoken = null, int? count = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName, skiptoken, count); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelContainerResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelContainerResourceArmPaginatedResult.DeserializeModelContainerResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsOperations.cs new file mode 100644 index 000000000000..fff9da87ad03 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsOperations.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The ModelVersions service client. + public partial class ModelVersionsOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal ModelVersionsRestOperations RestClient { get; } + /// Initializes a new instance of ModelVersionsOperations for mocking. + protected ModelVersionsOperations() + { + } + /// Initializes a new instance of ModelVersionsOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal ModelVersionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new ModelVersionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + public virtual async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return await RestClient.CreateOrUpdateAsync(name, version, resourceGroupName, workspaceName, body, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + public virtual Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body = null, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.CreateOrUpdate"); + scope.Start(); + try + { + return RestClient.CreateOrUpdate(name, version, resourceGroupName, workspaceName, body, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(name, version, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(name, version, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(name, version, resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List model versions. + /// Model name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Model version. + /// Model description. + /// Maximum number of results to return. + /// Number of initial results to skip. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// Property by which to order the results. + /// Only return the most recent version of a model. + /// The cancellation token to use. + /// , , or is null. + public virtual AsyncPageable ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// List model versions. + /// Model name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Model version. + /// Model description. + /// Maximum number of results to return. + /// Number of initial results to skip. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// Property by which to order the results. + /// Only return the most recent version of a model. + /// The cancellation token to use. + /// , , or is null. + public virtual Pageable List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("ModelVersionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsRestOperations.cs new file mode 100644 index 000000000000..83e3d7dae6a3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/ModelVersionsRestOperations.cs @@ -0,0 +1,642 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class ModelVersionsRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of ModelVersionsRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public ModelVersionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string name, string resourceGroupName, string workspaceName, string skiptoken, string version, string description, int? count, int? offset, string tags, string properties, string orderBy, bool? latestVersionOnly) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + if (version != null) + { + uri.AppendQuery("version", version, true); + } + if (description != null) + { + uri.AppendQuery("description", description, true); + } + if (count != null) + { + uri.AppendQuery("count", count.Value, true); + } + if (offset != null) + { + uri.AppendQuery("offset", offset.Value, true); + } + if (tags != null) + { + uri.AppendQuery("tags", tags, true); + } + if (properties != null) + { + uri.AppendQuery("properties", properties, true); + } + if (orderBy != null) + { + uri.AppendQuery("orderBy", orderBy, true); + } + if (latestVersionOnly != null) + { + uri.AppendQuery("latestVersionOnly", latestVersionOnly.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List model versions. + /// Model name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Model version. + /// Model description. + /// Maximum number of results to return. + /// Number of initial results to skip. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// Property by which to order the results. + /// Only return the most recent version of a model. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListAsync(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List model versions. + /// Model name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Model version. + /// Model description. + /// Maximum number of results to return. + /// Number of initial results to skip. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// Property by which to order the results. + /// Only return the most recent version of a model. + /// The cancellation token to use. + /// , , or is null. + public Response List(string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + return message; + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateOrUpdateAsync(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ModelVersionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelVersionResource.DeserializeModelVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Create or update version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Version entity to create or update. + /// The cancellation token to use. + /// , , , or is null. + public Response CreateOrUpdate(string name, string version, string resourceGroupName, string workspaceName, ModelVersionResource body = null, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateCreateOrUpdateRequest(name, version, resourceGroupName, workspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ModelVersionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelVersionResource.DeserializeModelVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string name, string version, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task> GetAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResource value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelVersionResource.DeserializeModelVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Get(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(name, version, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResource value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelVersionResource.DeserializeModelVersionResource(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string name, string version, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/models/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public async Task DeleteAsync(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete version. + /// Container name. + /// Version identifier. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , , or is null. + public Response Delete(string name, string version, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (version == null) + { + throw new ArgumentNullException(nameof(version)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(name, version, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken, string version, string description, int? count, int? offset, string tags, string properties, string orderBy, bool? latestVersionOnly) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List model versions. + /// The URL to the next page of results. + /// Model name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Model version. + /// Model description. + /// Maximum number of results to return. + /// Number of initial results to skip. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// Property by which to order the results. + /// Only return the most recent version of a model. + /// The cancellation token to use. + /// , , , or is null. + public async Task> ListNextPageAsync(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResourceArmPaginatedResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List model versions. + /// The URL to the next page of results. + /// Model name. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Continuation token for pagination. + /// Model version. + /// Model description. + /// Maximum number of results to return. + /// Number of initial results to skip. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// Property by which to order the results. + /// Only return the most recent version of a model. + /// The cancellation token to use. + /// , , , or is null. + public Response ListNextPage(string nextLink, string name, string resourceGroupName, string workspaceName, string skiptoken = null, string version = null, string description = null, int? count = null, int? offset = null, string tags = null, string properties = null, string orderBy = null, bool? latestVersionOnly = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, name, resourceGroupName, workspaceName, skiptoken, version, description, count, offset, tags, properties, orderBy, latestVersionOnly); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModelVersionResourceArmPaginatedResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModelVersionResourceArmPaginatedResult.DeserializeModelVersionResourceArmPaginatedResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.Serialization.cs new file mode 100644 index 000000000000..1b8080564455 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceCreateRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ContainerResourceRequirements)) + { + writer.WritePropertyName("containerResourceRequirements"); + writer.WriteObjectValue(ContainerResourceRequirements); + } + if (Optional.IsDefined(AuthEnabled)) + { + writer.WritePropertyName("authEnabled"); + writer.WriteBooleanValue(AuthEnabled.Value); + } + if (Optional.IsDefined(SslEnabled)) + { + writer.WritePropertyName("sslEnabled"); + writer.WriteBooleanValue(SslEnabled.Value); + } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } + if (Optional.IsDefined(DataCollection)) + { + writer.WritePropertyName("dataCollection"); + writer.WriteObjectValue(DataCollection); + } + if (Optional.IsDefined(SslCertificate)) + { + writer.WritePropertyName("sslCertificate"); + writer.WriteStringValue(SslCertificate); + } + if (Optional.IsDefined(SslKey)) + { + writer.WritePropertyName("sslKey"); + writer.WriteStringValue(SslKey); + } + if (Optional.IsDefined(Cname)) + { + writer.WritePropertyName("cname"); + writer.WriteStringValue(Cname); + } + if (Optional.IsDefined(DnsNameLabel)) + { + writer.WritePropertyName("dnsNameLabel"); + writer.WriteStringValue(DnsNameLabel); + } + if (Optional.IsDefined(VnetConfiguration)) + { + writer.WritePropertyName("vnetConfiguration"); + writer.WriteObjectValue(VnetConfiguration); + } + if (Optional.IsDefined(EncryptionProperties)) + { + writer.WritePropertyName("encryptionProperties"); + writer.WriteObjectValue(EncryptionProperties); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Keys)) + { + writer.WritePropertyName("keys"); + writer.WriteObjectValue(Keys); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(EnvironmentImageRequest)) + { + writer.WritePropertyName("environmentImageRequest"); + writer.WriteObjectValue(EnvironmentImageRequest); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.cs new file mode 100644 index 000000000000..2ab997da6d26 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequest.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ACIServiceCreateRequest. + public partial class ACIServiceCreateRequest : CreateServiceRequest + { + /// Initializes a new instance of ACIServiceCreateRequest. + public ACIServiceCreateRequest() + { + ComputeType = ComputeEnvironmentType.ACI; + } + + /// The container resource requirements. + public ContainerResourceRequirements ContainerResourceRequirements { get; set; } + /// Whether or not authentication is enabled on the service. + public bool? AuthEnabled { get; set; } + /// Whether or not SSL is enabled. + public bool? SslEnabled { get; set; } + /// Whether or not Application Insights is enabled. + public bool? AppInsightsEnabled { get; set; } + /// Details of the data collection options specified. + public ModelDataCollection DataCollection { get; set; } + /// The public SSL certificate in PEM format to use if SSL is enabled. + public string SslCertificate { get; set; } + /// The public SSL key in PEM format for the certificate. + public string SslKey { get; set; } + /// The CName for the service. + public string Cname { get; set; } + /// The Dns label for the service. + public string DnsNameLabel { get; set; } + /// The virtual network configuration. + public VnetConfiguration VnetConfiguration { get; set; } + /// The encryption properties. + public EncryptionProperties EncryptionProperties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.Serialization.cs new file mode 100644 index 000000000000..cc64c61aaacb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceCreateRequestDataCollection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EventHubEnabled)) + { + writer.WritePropertyName("eventHubEnabled"); + writer.WriteBooleanValue(EventHubEnabled.Value); + } + if (Optional.IsDefined(StorageEnabled)) + { + writer.WritePropertyName("storageEnabled"); + writer.WriteBooleanValue(StorageEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static ACIServiceCreateRequestDataCollection DeserializeACIServiceCreateRequestDataCollection(JsonElement element) + { + Optional eventHubEnabled = default; + Optional storageEnabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventHubEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + eventHubEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("storageEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + storageEnabled = property.Value.GetBoolean(); + continue; + } + } + return new ACIServiceCreateRequestDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.cs new file mode 100644 index 000000000000..785e4ffea575 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestDataCollection.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of the data collection options specified. + public partial class ACIServiceCreateRequestDataCollection : ModelDataCollection + { + /// Initializes a new instance of ACIServiceCreateRequestDataCollection. + public ACIServiceCreateRequestDataCollection() + { + } + + /// Initializes a new instance of ACIServiceCreateRequestDataCollection. + /// Option for enabling/disabling Event Hub. + /// Option for enabling/disabling storage. + internal ACIServiceCreateRequestDataCollection(bool? eventHubEnabled, bool? storageEnabled) : base(eventHubEnabled, storageEnabled) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.Serialization.cs new file mode 100644 index 000000000000..ecd32a4ef826 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceCreateRequestEncryptionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("vaultBaseUrl"); + writer.WriteStringValue(VaultBaseUrl); + writer.WritePropertyName("keyName"); + writer.WriteStringValue(KeyName); + writer.WritePropertyName("keyVersion"); + writer.WriteStringValue(KeyVersion); + writer.WriteEndObject(); + } + + internal static ACIServiceCreateRequestEncryptionProperties DeserializeACIServiceCreateRequestEncryptionProperties(JsonElement element) + { + string vaultBaseUrl = default; + string keyName = default; + string keyVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vaultBaseUrl")) + { + vaultBaseUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyName")) + { + keyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyVersion")) + { + keyVersion = property.Value.GetString(); + continue; + } + } + return new ACIServiceCreateRequestEncryptionProperties(vaultBaseUrl, keyName, keyVersion); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.cs new file mode 100644 index 000000000000..a9627df73880 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestEncryptionProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The encryption properties. + public partial class ACIServiceCreateRequestEncryptionProperties : EncryptionProperties + { + /// Initializes a new instance of ACIServiceCreateRequestEncryptionProperties. + /// vault base Url. + /// Encryption Key name. + /// Encryption Key Version. + /// , , or is null. + public ACIServiceCreateRequestEncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) : base(vaultBaseUrl, keyName, keyVersion) + { + if (vaultBaseUrl == null) + { + throw new ArgumentNullException(nameof(vaultBaseUrl)); + } + if (keyName == null) + { + throw new ArgumentNullException(nameof(keyName)); + } + if (keyVersion == null) + { + throw new ArgumentNullException(nameof(keyVersion)); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.Serialization.cs new file mode 100644 index 000000000000..31edbf27e056 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceCreateRequestVnetConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VnetName)) + { + writer.WritePropertyName("vnetName"); + writer.WriteStringValue(VnetName); + } + if (Optional.IsDefined(SubnetName)) + { + writer.WritePropertyName("subnetName"); + writer.WriteStringValue(SubnetName); + } + writer.WriteEndObject(); + } + + internal static ACIServiceCreateRequestVnetConfiguration DeserializeACIServiceCreateRequestVnetConfiguration(JsonElement element) + { + Optional vnetName = default; + Optional subnetName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vnetName")) + { + vnetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetName")) + { + subnetName = property.Value.GetString(); + continue; + } + } + return new ACIServiceCreateRequestVnetConfiguration(vnetName.Value, subnetName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.cs new file mode 100644 index 000000000000..6f2ecf107c1d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceCreateRequestVnetConfiguration.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The virtual network configuration. + public partial class ACIServiceCreateRequestVnetConfiguration : VnetConfiguration + { + /// Initializes a new instance of ACIServiceCreateRequestVnetConfiguration. + public ACIServiceCreateRequestVnetConfiguration() + { + } + + /// Initializes a new instance of ACIServiceCreateRequestVnetConfiguration. + /// The name of the virtual network. + /// The name of the virtual network subnet. + internal ACIServiceCreateRequestVnetConfiguration(string vnetName, string subnetName) : base(vnetName, subnetName) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.Serialization.cs new file mode 100644 index 000000000000..0b3a4681d9e4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.Serialization.cs @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ContainerResourceRequirements)) + { + writer.WritePropertyName("containerResourceRequirements"); + writer.WriteObjectValue(ContainerResourceRequirements); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(AuthEnabled)) + { + writer.WritePropertyName("authEnabled"); + writer.WriteBooleanValue(AuthEnabled.Value); + } + if (Optional.IsDefined(SslEnabled)) + { + writer.WritePropertyName("sslEnabled"); + writer.WriteBooleanValue(SslEnabled.Value); + } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } + if (Optional.IsDefined(DataCollection)) + { + writer.WritePropertyName("dataCollection"); + writer.WriteObjectValue(DataCollection); + } + if (Optional.IsDefined(SslCertificate)) + { + writer.WritePropertyName("sslCertificate"); + writer.WriteStringValue(SslCertificate); + } + if (Optional.IsDefined(SslKey)) + { + writer.WritePropertyName("sslKey"); + writer.WriteStringValue(SslKey); + } + if (Optional.IsDefined(Cname)) + { + writer.WritePropertyName("cname"); + writer.WriteStringValue(Cname); + } + if (Optional.IsDefined(PublicIp)) + { + writer.WritePropertyName("publicIp"); + writer.WriteStringValue(PublicIp); + } + if (Optional.IsDefined(PublicFqdn)) + { + writer.WritePropertyName("publicFqdn"); + writer.WriteStringValue(PublicFqdn); + } + if (Optional.IsCollectionDefined(Models)) + { + writer.WritePropertyName("models"); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(EnvironmentImageRequest)) + { + writer.WritePropertyName("environmentImageRequest"); + writer.WriteObjectValue(EnvironmentImageRequest); + } + if (Optional.IsDefined(VnetConfiguration)) + { + writer.WritePropertyName("vnetConfiguration"); + writer.WriteObjectValue(VnetConfiguration); + } + if (Optional.IsDefined(EncryptionProperties)) + { + writer.WritePropertyName("encryptionProperties"); + writer.WriteObjectValue(EncryptionProperties); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(DeploymentType)) + { + writer.WritePropertyName("deploymentType"); + writer.WriteStringValue(DeploymentType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static ACIServiceResponse DeserializeACIServiceResponse(JsonElement element) + { + Optional containerResourceRequirements = default; + Optional scoringUri = default; + Optional location = default; + Optional authEnabled = default; + Optional sslEnabled = default; + Optional appInsightsEnabled = default; + Optional dataCollection = default; + Optional sslCertificate = default; + Optional sslKey = default; + Optional cname = default; + Optional publicIp = default; + Optional publicFqdn = default; + Optional swaggerUri = default; + Optional> modelConfigMap = default; + Optional> models = default; + Optional environmentImageRequest = default; + Optional vnetConfiguration = default; + Optional encryptionProperties = default; + Optional description = default; + Optional> kvTags = default; + Optional> properties = default; + Optional state = default; + Optional error = default; + ComputeEnvironmentType computeType = default; + Optional deploymentType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerResourceRequirements")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + containerResourceRequirements = ContainerResourceRequirements.DeserializeContainerResourceRequirements(property.Value); + continue; + } + if (property.NameEquals("scoringUri")) + { + scoringUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("authEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + authEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("sslEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sslEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("appInsightsEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + appInsightsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dataCollection")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + dataCollection = ModelDataCollection.DeserializeModelDataCollection(property.Value); + continue; + } + if (property.NameEquals("sslCertificate")) + { + sslCertificate = property.Value.GetString(); + continue; + } + if (property.NameEquals("sslKey")) + { + sslKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("cname")) + { + cname = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicIp")) + { + publicIp = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicFqdn")) + { + publicFqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("swaggerUri")) + { + swaggerUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelConfigMap")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + modelConfigMap = dictionary; + continue; + } + if (property.NameEquals("models")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Model.DeserializeModel(item)); + } + models = array; + continue; + } + if (property.NameEquals("environmentImageRequest")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environmentImageRequest = EnvironmentImageResponse.DeserializeEnvironmentImageResponse(property.Value); + continue; + } + if (property.NameEquals("vnetConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + vnetConfiguration = VnetConfiguration.DeserializeVnetConfiguration(property.Value); + continue; + } + if (property.NameEquals("encryptionProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + encryptionProperties = EncryptionProperties.DeserializeEncryptionProperties(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("kvTags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + kvTags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new WebServiceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = ErrorResponse.DeserializeErrorResponse(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + deploymentType = new DeploymentType(property.Value.GetString()); + continue; + } + } + return new ACIServiceResponse(description.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToNullable(state), error.Value, computeType, Optional.ToNullable(deploymentType), containerResourceRequirements.Value, scoringUri.Value, location.Value, Optional.ToNullable(authEnabled), Optional.ToNullable(sslEnabled), Optional.ToNullable(appInsightsEnabled), dataCollection.Value, sslCertificate.Value, sslKey.Value, cname.Value, publicIp.Value, publicFqdn.Value, swaggerUri.Value, Optional.ToDictionary(modelConfigMap), Optional.ToList(models), environmentImageRequest.Value, vnetConfiguration.Value, encryptionProperties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.cs new file mode 100644 index 000000000000..8d09312e2fb7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponse.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The response for an ACI service. + public partial class ACIServiceResponse : ServiceResponseBase + { + /// Initializes a new instance of ACIServiceResponse. + public ACIServiceResponse() + { + ModelConfigMap = new ChangeTrackingDictionary(); + Models = new ChangeTrackingList(); + ComputeType = ComputeEnvironmentType.ACI; + } + + /// Initializes a new instance of ACIServiceResponse. + /// The service description. + /// The service tag dictionary. Tags are mutable. + /// The service property dictionary. Properties are immutable. + /// The current state of the service. + /// The error details. + /// The compute environment type for the service. + /// The deployment type for the service. + /// The container resource requirements. + /// The Uri for sending scoring requests. + /// The name of the Azure location/region. + /// Whether or not authentication is enabled on the service. + /// Whether or not SSL is enabled. + /// Whether or not Application Insights is enabled. + /// Details of the data collection options specified. + /// The public SSL certificate in PEM format to use if SSL is enabled. + /// The public SSL key in PEM format for the certificate. + /// The CName for the service. + /// The public IP address for the service. + /// The public Fqdn for the service. + /// The Uri for sending swagger requests. + /// Details on the models and configurations. + /// The list of models. + /// The Environment, models and assets used for inferencing. + /// The virtual network configuration. + /// The encryption properties. + internal ACIServiceResponse(string description, IDictionary kvTags, IDictionary properties, WebServiceState? state, ErrorResponse error, ComputeEnvironmentType computeType, DeploymentType? deploymentType, ContainerResourceRequirements containerResourceRequirements, string scoringUri, string location, bool? authEnabled, bool? sslEnabled, bool? appInsightsEnabled, ModelDataCollection dataCollection, string sslCertificate, string sslKey, string cname, string publicIp, string publicFqdn, string swaggerUri, IReadOnlyDictionary modelConfigMap, IList models, EnvironmentImageResponse environmentImageRequest, VnetConfiguration vnetConfiguration, EncryptionProperties encryptionProperties) : base(description, kvTags, properties, state, error, computeType, deploymentType) + { + ContainerResourceRequirements = containerResourceRequirements; + ScoringUri = scoringUri; + Location = location; + AuthEnabled = authEnabled; + SslEnabled = sslEnabled; + AppInsightsEnabled = appInsightsEnabled; + DataCollection = dataCollection; + SslCertificate = sslCertificate; + SslKey = sslKey; + Cname = cname; + PublicIp = publicIp; + PublicFqdn = publicFqdn; + SwaggerUri = swaggerUri; + ModelConfigMap = modelConfigMap; + Models = models; + EnvironmentImageRequest = environmentImageRequest; + VnetConfiguration = vnetConfiguration; + EncryptionProperties = encryptionProperties; + ComputeType = computeType; + } + + /// The container resource requirements. + public ContainerResourceRequirements ContainerResourceRequirements { get; set; } + /// The Uri for sending scoring requests. + public string ScoringUri { get; } + /// The name of the Azure location/region. + public string Location { get; set; } + /// Whether or not authentication is enabled on the service. + public bool? AuthEnabled { get; set; } + /// Whether or not SSL is enabled. + public bool? SslEnabled { get; set; } + /// Whether or not Application Insights is enabled. + public bool? AppInsightsEnabled { get; set; } + /// Details of the data collection options specified. + public ModelDataCollection DataCollection { get; set; } + /// The public SSL certificate in PEM format to use if SSL is enabled. + public string SslCertificate { get; set; } + /// The public SSL key in PEM format for the certificate. + public string SslKey { get; set; } + /// The CName for the service. + public string Cname { get; set; } + /// The public IP address for the service. + public string PublicIp { get; set; } + /// The public Fqdn for the service. + public string PublicFqdn { get; set; } + /// The Uri for sending swagger requests. + public string SwaggerUri { get; } + /// Details on the models and configurations. + public IReadOnlyDictionary ModelConfigMap { get; } + /// The list of models. + public IList Models { get; } + /// The Environment, models and assets used for inferencing. + public EnvironmentImageResponse EnvironmentImageRequest { get; set; } + /// The virtual network configuration. + public VnetConfiguration VnetConfiguration { get; set; } + /// The encryption properties. + public EncryptionProperties EncryptionProperties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.Serialization.cs new file mode 100644 index 000000000000..8f0ee9b37522 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceResponseDataCollection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EventHubEnabled)) + { + writer.WritePropertyName("eventHubEnabled"); + writer.WriteBooleanValue(EventHubEnabled.Value); + } + if (Optional.IsDefined(StorageEnabled)) + { + writer.WritePropertyName("storageEnabled"); + writer.WriteBooleanValue(StorageEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static ACIServiceResponseDataCollection DeserializeACIServiceResponseDataCollection(JsonElement element) + { + Optional eventHubEnabled = default; + Optional storageEnabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventHubEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + eventHubEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("storageEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + storageEnabled = property.Value.GetBoolean(); + continue; + } + } + return new ACIServiceResponseDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.cs new file mode 100644 index 000000000000..1044ffb135ca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseDataCollection.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of the data collection options specified. + public partial class ACIServiceResponseDataCollection : ModelDataCollection + { + /// Initializes a new instance of ACIServiceResponseDataCollection. + public ACIServiceResponseDataCollection() + { + } + + /// Initializes a new instance of ACIServiceResponseDataCollection. + /// Option for enabling/disabling Event Hub. + /// Option for enabling/disabling storage. + internal ACIServiceResponseDataCollection(bool? eventHubEnabled, bool? storageEnabled) : base(eventHubEnabled, storageEnabled) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.Serialization.cs new file mode 100644 index 000000000000..78efe3762424 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceResponseEncryptionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("vaultBaseUrl"); + writer.WriteStringValue(VaultBaseUrl); + writer.WritePropertyName("keyName"); + writer.WriteStringValue(KeyName); + writer.WritePropertyName("keyVersion"); + writer.WriteStringValue(KeyVersion); + writer.WriteEndObject(); + } + + internal static ACIServiceResponseEncryptionProperties DeserializeACIServiceResponseEncryptionProperties(JsonElement element) + { + string vaultBaseUrl = default; + string keyName = default; + string keyVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vaultBaseUrl")) + { + vaultBaseUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyName")) + { + keyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyVersion")) + { + keyVersion = property.Value.GetString(); + continue; + } + } + return new ACIServiceResponseEncryptionProperties(vaultBaseUrl, keyName, keyVersion); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.cs new file mode 100644 index 000000000000..077c270e083c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEncryptionProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The encryption properties. + public partial class ACIServiceResponseEncryptionProperties : EncryptionProperties + { + /// Initializes a new instance of ACIServiceResponseEncryptionProperties. + /// vault base Url. + /// Encryption Key name. + /// Encryption Key Version. + /// , , or is null. + public ACIServiceResponseEncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) : base(vaultBaseUrl, keyName, keyVersion) + { + if (vaultBaseUrl == null) + { + throw new ArgumentNullException(nameof(vaultBaseUrl)); + } + if (keyName == null) + { + throw new ArgumentNullException(nameof(keyName)); + } + if (keyVersion == null) + { + throw new ArgumentNullException(nameof(keyVersion)); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.Serialization.cs new file mode 100644 index 000000000000..c6e0a8f1b6d4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceResponseEnvironmentImageRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DriverProgram)) + { + writer.WritePropertyName("driverProgram"); + writer.WriteStringValue(DriverProgram); + } + if (Optional.IsCollectionDefined(Assets)) + { + writer.WritePropertyName("assets"); + writer.WriteStartArray(); + foreach (var item in Assets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModelIds)) + { + writer.WritePropertyName("modelIds"); + writer.WriteStartArray(); + foreach (var item in ModelIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Models)) + { + writer.WritePropertyName("models"); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Environment)) + { + writer.WritePropertyName("environment"); + writer.WriteObjectValue(Environment); + } + if (Optional.IsDefined(EnvironmentReference)) + { + writer.WritePropertyName("environmentReference"); + writer.WriteObjectValue(EnvironmentReference); + } + writer.WriteEndObject(); + } + + internal static ACIServiceResponseEnvironmentImageRequest DeserializeACIServiceResponseEnvironmentImageRequest(JsonElement element) + { + Optional driverProgram = default; + Optional> assets = default; + Optional> modelIds = default; + Optional> models = default; + Optional environment = default; + Optional environmentReference = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("driverProgram")) + { + driverProgram = property.Value.GetString(); + continue; + } + if (property.NameEquals("assets")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImageAsset.DeserializeImageAsset(item)); + } + assets = array; + continue; + } + if (property.NameEquals("modelIds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + modelIds = array; + continue; + } + if (property.NameEquals("models")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Model.DeserializeModel(item)); + } + models = array; + continue; + } + if (property.NameEquals("environment")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environment = ModelEnvironmentDefinitionResponse.DeserializeModelEnvironmentDefinitionResponse(property.Value); + continue; + } + if (property.NameEquals("environmentReference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environmentReference = EnvironmentReference.DeserializeEnvironmentReference(property.Value); + continue; + } + } + return new ACIServiceResponseEnvironmentImageRequest(driverProgram.Value, Optional.ToList(assets), Optional.ToList(modelIds), Optional.ToList(models), environment.Value, environmentReference.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.cs new file mode 100644 index 000000000000..c70e2c0dbb12 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseEnvironmentImageRequest.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Environment, models and assets used for inferencing. + public partial class ACIServiceResponseEnvironmentImageRequest : EnvironmentImageResponse + { + /// Initializes a new instance of ACIServiceResponseEnvironmentImageRequest. + public ACIServiceResponseEnvironmentImageRequest() + { + } + + /// Initializes a new instance of ACIServiceResponseEnvironmentImageRequest. + /// The name of the driver file. + /// The list of assets. + /// The list of model Ids. + /// The list of models. + /// The details of the AZURE ML environment. + /// The unique identifying details of the AZURE ML environment. + internal ACIServiceResponseEnvironmentImageRequest(string driverProgram, IList assets, IList modelIds, IList models, ModelEnvironmentDefinitionResponse environment, EnvironmentReference environmentReference) : base(driverProgram, assets, modelIds, models, environment, environmentReference) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.Serialization.cs new file mode 100644 index 000000000000..5c0ea2e9fbb1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ACIServiceResponseVnetConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VnetName)) + { + writer.WritePropertyName("vnetName"); + writer.WriteStringValue(VnetName); + } + if (Optional.IsDefined(SubnetName)) + { + writer.WritePropertyName("subnetName"); + writer.WriteStringValue(SubnetName); + } + writer.WriteEndObject(); + } + + internal static ACIServiceResponseVnetConfiguration DeserializeACIServiceResponseVnetConfiguration(JsonElement element) + { + Optional vnetName = default; + Optional subnetName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vnetName")) + { + vnetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetName")) + { + subnetName = property.Value.GetString(); + continue; + } + } + return new ACIServiceResponseVnetConfiguration(vnetName.Value, subnetName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.cs new file mode 100644 index 000000000000..5d6c8a3d7908 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ACIServiceResponseVnetConfiguration.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The virtual network configuration. + public partial class ACIServiceResponseVnetConfiguration : VnetConfiguration + { + /// Initializes a new instance of ACIServiceResponseVnetConfiguration. + public ACIServiceResponseVnetConfiguration() + { + } + + /// Initializes a new instance of ACIServiceResponseVnetConfiguration. + /// The name of the virtual network. + /// The name of the virtual network subnet. + internal ACIServiceResponseVnetConfiguration(string vnetName, string subnetName) : base(vnetName, subnetName) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.Serialization.cs new file mode 100644 index 000000000000..78bba19ba4ba --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKS : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static AKS DeserializeAKS(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = AKSProperties.DeserializeAKSProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new AKS(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.cs new file mode 100644 index 000000000000..5fa28ae66bc9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKS.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A Machine Learning compute based on AKS. + public partial class AKS : Compute + { + /// Initializes a new instance of AKS. + public AKS() + { + ComputeType = ComputeType.AKS; + } + + /// Initializes a new instance of AKS. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// AKS properties. + internal AKS(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, AKSProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + { + Properties = properties; + ComputeType = computeType; + } + + /// AKS properties. + public AKSProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.Serialization.cs new file mode 100644 index 000000000000..2c63b88b8f5a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ClusterFqdn)) + { + writer.WritePropertyName("clusterFqdn"); + writer.WriteStringValue(ClusterFqdn); + } + if (Optional.IsDefined(AgentCount)) + { + writer.WritePropertyName("agentCount"); + writer.WriteNumberValue(AgentCount.Value); + } + if (Optional.IsDefined(AgentVMSize)) + { + writer.WritePropertyName("agentVMSize"); + writer.WriteStringValue(AgentVMSize); + } + if (Optional.IsDefined(SslConfiguration)) + { + writer.WritePropertyName("sslConfiguration"); + writer.WriteObjectValue(SslConfiguration); + } + if (Optional.IsDefined(AksNetworkingConfiguration)) + { + writer.WritePropertyName("aksNetworkingConfiguration"); + writer.WriteObjectValue(AksNetworkingConfiguration); + } + writer.WriteEndObject(); + } + + internal static AKSProperties DeserializeAKSProperties(JsonElement element) + { + Optional clusterFqdn = default; + Optional> systemServices = default; + Optional agentCount = default; + Optional agentVMSize = default; + Optional sslConfiguration = default; + Optional aksNetworkingConfiguration = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterFqdn")) + { + clusterFqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("systemServices")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SystemService.DeserializeSystemService(item)); + } + systemServices = array; + continue; + } + if (property.NameEquals("agentCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + agentCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("agentVMSize")) + { + agentVMSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("sslConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sslConfiguration = SslConfiguration.DeserializeSslConfiguration(property.Value); + continue; + } + if (property.NameEquals("aksNetworkingConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + aksNetworkingConfiguration = AksNetworkingConfiguration.DeserializeAksNetworkingConfiguration(property.Value); + continue; + } + } + return new AKSProperties(clusterFqdn.Value, Optional.ToList(systemServices), Optional.ToNullable(agentCount), agentVMSize.Value, sslConfiguration.Value, aksNetworkingConfiguration.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.cs new file mode 100644 index 000000000000..1489464b0c6e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// AKS properties. + public partial class AKSProperties + { + /// Initializes a new instance of AKSProperties. + public AKSProperties() + { + SystemServices = new ChangeTrackingList(); + } + + /// Initializes a new instance of AKSProperties. + /// Cluster full qualified domain name. + /// System services. + /// Number of agents. + /// Agent virtual machine size. + /// SSL configuration. + /// AKS networking configuration for vnet. + internal AKSProperties(string clusterFqdn, IReadOnlyList systemServices, int? agentCount, string agentVMSize, SslConfiguration sslConfiguration, AksNetworkingConfiguration aksNetworkingConfiguration) + { + ClusterFqdn = clusterFqdn; + SystemServices = systemServices; + AgentCount = agentCount; + AgentVMSize = agentVMSize; + SslConfiguration = sslConfiguration; + AksNetworkingConfiguration = aksNetworkingConfiguration; + } + + /// Cluster full qualified domain name. + public string ClusterFqdn { get; set; } + /// System services. + public IReadOnlyList SystemServices { get; } + /// Number of agents. + public int? AgentCount { get; set; } + /// Agent virtual machine size. + public string AgentVMSize { get; set; } + /// SSL configuration. + public SslConfiguration SslConfiguration { get; set; } + /// AKS networking configuration for vnet. + public AksNetworkingConfiguration AksNetworkingConfiguration { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.Serialization.cs new file mode 100644 index 000000000000..d897fc6a4946 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSReplicaStatus + { + internal static AKSReplicaStatus DeserializeAKSReplicaStatus(JsonElement element) + { + Optional desiredReplicas = default; + Optional updatedReplicas = default; + Optional availableReplicas = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("desiredReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + desiredReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("updatedReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + updatedReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + availableReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = ErrorResponse.DeserializeErrorResponse(property.Value); + continue; + } + } + return new AKSReplicaStatus(Optional.ToNullable(desiredReplicas), Optional.ToNullable(updatedReplicas), Optional.ToNullable(availableReplicas), error.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.cs new file mode 100644 index 000000000000..ea3466eb5688 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatus.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The AKSReplicaStatus. + public partial class AKSReplicaStatus + { + /// Initializes a new instance of AKSReplicaStatus. + internal AKSReplicaStatus() + { + } + + /// Initializes a new instance of AKSReplicaStatus. + /// The desired number of replicas. + /// The number of updated replicas. + /// The number of available replicas. + /// The error details. + internal AKSReplicaStatus(int? desiredReplicas, int? updatedReplicas, int? availableReplicas, ErrorResponse error) + { + DesiredReplicas = desiredReplicas; + UpdatedReplicas = updatedReplicas; + AvailableReplicas = availableReplicas; + Error = error; + } + + /// The desired number of replicas. + public int? DesiredReplicas { get; } + /// The number of updated replicas. + public int? UpdatedReplicas { get; } + /// The number of available replicas. + public int? AvailableReplicas { get; } + /// The error details. + public ErrorResponse Error { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.Serialization.cs new file mode 100644 index 000000000000..41da2069b720 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSReplicaStatusError + { + internal static AKSReplicaStatusError DeserializeAKSReplicaStatusError(JsonElement element) + { + Optional code = default; + Optional message = default; + Optional> details = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorDetail.DeserializeErrorDetail(item)); + } + details = array; + continue; + } + } + return new AKSReplicaStatusError(code.Value, message.Value, Optional.ToList(details)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.cs new file mode 100644 index 000000000000..a3becc701704 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSReplicaStatusError.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The error details. + public partial class AKSReplicaStatusError : ErrorResponse + { + /// Initializes a new instance of AKSReplicaStatusError. + internal AKSReplicaStatusError() + { + } + + /// Initializes a new instance of AKSReplicaStatusError. + /// Error code. + /// Error message. + /// An array of error detail objects. + internal AKSReplicaStatusError(string code, string message, IReadOnlyList details) : base(code, message, details) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.Serialization.cs new file mode 100644 index 000000000000..c6811f88ac0d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceCreateRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(NumReplicas)) + { + writer.WritePropertyName("numReplicas"); + writer.WriteNumberValue(NumReplicas.Value); + } + if (Optional.IsDefined(DataCollection)) + { + writer.WritePropertyName("dataCollection"); + writer.WriteObjectValue(DataCollection); + } + if (Optional.IsDefined(ComputeName)) + { + writer.WritePropertyName("computeName"); + writer.WriteStringValue(ComputeName); + } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } + if (Optional.IsDefined(AutoScaler)) + { + writer.WritePropertyName("autoScaler"); + writer.WriteObjectValue(AutoScaler); + } + if (Optional.IsDefined(ContainerResourceRequirements)) + { + writer.WritePropertyName("containerResourceRequirements"); + writer.WriteObjectValue(ContainerResourceRequirements); + } + if (Optional.IsDefined(MaxConcurrentRequestsPerContainer)) + { + writer.WritePropertyName("maxConcurrentRequestsPerContainer"); + writer.WriteNumberValue(MaxConcurrentRequestsPerContainer.Value); + } + if (Optional.IsDefined(MaxQueueWaitMs)) + { + writer.WritePropertyName("maxQueueWaitMs"); + writer.WriteNumberValue(MaxQueueWaitMs.Value); + } + if (Optional.IsDefined(Namespace)) + { + writer.WritePropertyName("namespace"); + writer.WriteStringValue(Namespace); + } + if (Optional.IsDefined(ScoringTimeoutMs)) + { + writer.WritePropertyName("scoringTimeoutMs"); + writer.WriteNumberValue(ScoringTimeoutMs.Value); + } + if (Optional.IsDefined(AuthEnabled)) + { + writer.WritePropertyName("authEnabled"); + writer.WriteBooleanValue(AuthEnabled.Value); + } + if (Optional.IsDefined(LivenessProbeRequirements)) + { + writer.WritePropertyName("livenessProbeRequirements"); + writer.WriteObjectValue(LivenessProbeRequirements); + } + if (Optional.IsDefined(AadAuthEnabled)) + { + writer.WritePropertyName("aadAuthEnabled"); + writer.WriteBooleanValue(AadAuthEnabled.Value); + } + if (Optional.IsDefined(IsDefault)) + { + writer.WritePropertyName("isDefault"); + writer.WriteBooleanValue(IsDefault.Value); + } + if (Optional.IsDefined(TrafficPercentile)) + { + writer.WritePropertyName("trafficPercentile"); + writer.WriteNumberValue(TrafficPercentile.Value); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Keys)) + { + writer.WritePropertyName("keys"); + writer.WriteObjectValue(Keys); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(EnvironmentImageRequest)) + { + writer.WritePropertyName("environmentImageRequest"); + writer.WriteObjectValue(EnvironmentImageRequest); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.cs new file mode 100644 index 000000000000..aea4fc612c32 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequest.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The request to create an AKS service. + public partial class AKSServiceCreateRequest : CreateEndpointVariantRequest + { + /// Initializes a new instance of AKSServiceCreateRequest. + public AKSServiceCreateRequest() + { + ComputeType = ComputeEnvironmentType.AKS; + } + + /// The number of replicas on the cluster. + public int? NumReplicas { get; set; } + /// Details of the data collection options specified. + public ModelDataCollection DataCollection { get; set; } + /// The name of the compute resource. + public string ComputeName { get; set; } + /// Whether or not Application Insights is enabled. + public bool? AppInsightsEnabled { get; set; } + /// The auto scaler properties. + public AutoScaler AutoScaler { get; set; } + /// The container resource requirements. + public ContainerResourceRequirements ContainerResourceRequirements { get; set; } + /// The maximum number of concurrent requests per container. + public int? MaxConcurrentRequestsPerContainer { get; set; } + /// Maximum time a request will wait in the queue (in milliseconds). After this time, the service will return 503 (Service Unavailable). + public int? MaxQueueWaitMs { get; set; } + /// Kubernetes namespace for the service. + public string Namespace { get; set; } + /// The scoring timeout in milliseconds. + public int? ScoringTimeoutMs { get; set; } + /// Whether or not authentication is enabled. + public bool? AuthEnabled { get; set; } + /// The liveness probe requirements. + public LivenessProbeRequirements LivenessProbeRequirements { get; set; } + /// Whether or not AAD authentication is enabled. + public bool? AadAuthEnabled { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.Serialization.cs new file mode 100644 index 000000000000..d8fb57039b83 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceCreateRequestAutoScaler : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AutoscaleEnabled)) + { + writer.WritePropertyName("autoscaleEnabled"); + writer.WriteBooleanValue(AutoscaleEnabled.Value); + } + if (Optional.IsDefined(MinReplicas)) + { + writer.WritePropertyName("minReplicas"); + writer.WriteNumberValue(MinReplicas.Value); + } + if (Optional.IsDefined(MaxReplicas)) + { + writer.WritePropertyName("maxReplicas"); + writer.WriteNumberValue(MaxReplicas.Value); + } + if (Optional.IsDefined(TargetUtilization)) + { + writer.WritePropertyName("targetUtilization"); + writer.WriteNumberValue(TargetUtilization.Value); + } + if (Optional.IsDefined(RefreshPeriodInSeconds)) + { + writer.WritePropertyName("refreshPeriodInSeconds"); + writer.WriteNumberValue(RefreshPeriodInSeconds.Value); + } + writer.WriteEndObject(); + } + + internal static AKSServiceCreateRequestAutoScaler DeserializeAKSServiceCreateRequestAutoScaler(JsonElement element) + { + Optional autoscaleEnabled = default; + Optional minReplicas = default; + Optional maxReplicas = default; + Optional targetUtilization = default; + Optional refreshPeriodInSeconds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoscaleEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoscaleEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("minReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetUtilization")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + targetUtilization = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("refreshPeriodInSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + refreshPeriodInSeconds = property.Value.GetInt32(); + continue; + } + } + return new AKSServiceCreateRequestAutoScaler(Optional.ToNullable(autoscaleEnabled), Optional.ToNullable(minReplicas), Optional.ToNullable(maxReplicas), Optional.ToNullable(targetUtilization), Optional.ToNullable(refreshPeriodInSeconds)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.cs new file mode 100644 index 000000000000..7b78c3585112 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestAutoScaler.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The auto scaler properties. + public partial class AKSServiceCreateRequestAutoScaler : AutoScaler + { + /// Initializes a new instance of AKSServiceCreateRequestAutoScaler. + public AKSServiceCreateRequestAutoScaler() + { + } + + /// Initializes a new instance of AKSServiceCreateRequestAutoScaler. + /// Option to enable/disable auto scaling. + /// The minimum number of replicas to scale down to. + /// The maximum number of replicas in the cluster. + /// The target utilization percentage to use for determining whether to scale the cluster. + /// The amount of seconds to wait between auto scale updates. + internal AKSServiceCreateRequestAutoScaler(bool? autoscaleEnabled, int? minReplicas, int? maxReplicas, int? targetUtilization, int? refreshPeriodInSeconds) : base(autoscaleEnabled, minReplicas, maxReplicas, targetUtilization, refreshPeriodInSeconds) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.Serialization.cs new file mode 100644 index 000000000000..ba6822968dd7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceCreateRequestDataCollection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EventHubEnabled)) + { + writer.WritePropertyName("eventHubEnabled"); + writer.WriteBooleanValue(EventHubEnabled.Value); + } + if (Optional.IsDefined(StorageEnabled)) + { + writer.WritePropertyName("storageEnabled"); + writer.WriteBooleanValue(StorageEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static AKSServiceCreateRequestDataCollection DeserializeAKSServiceCreateRequestDataCollection(JsonElement element) + { + Optional eventHubEnabled = default; + Optional storageEnabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventHubEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + eventHubEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("storageEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + storageEnabled = property.Value.GetBoolean(); + continue; + } + } + return new AKSServiceCreateRequestDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.cs new file mode 100644 index 000000000000..2b8049f0b809 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestDataCollection.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of the data collection options specified. + public partial class AKSServiceCreateRequestDataCollection : ModelDataCollection + { + /// Initializes a new instance of AKSServiceCreateRequestDataCollection. + public AKSServiceCreateRequestDataCollection() + { + } + + /// Initializes a new instance of AKSServiceCreateRequestDataCollection. + /// Option for enabling/disabling Event Hub. + /// Option for enabling/disabling storage. + internal AKSServiceCreateRequestDataCollection(bool? eventHubEnabled, bool? storageEnabled) : base(eventHubEnabled, storageEnabled) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.Serialization.cs new file mode 100644 index 000000000000..93357ee13b00 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceCreateRequestLivenessProbeRequirements : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(FailureThreshold)) + { + writer.WritePropertyName("failureThreshold"); + writer.WriteNumberValue(FailureThreshold.Value); + } + if (Optional.IsDefined(SuccessThreshold)) + { + writer.WritePropertyName("successThreshold"); + writer.WriteNumberValue(SuccessThreshold.Value); + } + if (Optional.IsDefined(TimeoutSeconds)) + { + writer.WritePropertyName("timeoutSeconds"); + writer.WriteNumberValue(TimeoutSeconds.Value); + } + if (Optional.IsDefined(PeriodSeconds)) + { + writer.WritePropertyName("periodSeconds"); + writer.WriteNumberValue(PeriodSeconds.Value); + } + if (Optional.IsDefined(InitialDelaySeconds)) + { + writer.WritePropertyName("initialDelaySeconds"); + writer.WriteNumberValue(InitialDelaySeconds.Value); + } + writer.WriteEndObject(); + } + + internal static AKSServiceCreateRequestLivenessProbeRequirements DeserializeAKSServiceCreateRequestLivenessProbeRequirements(JsonElement element) + { + Optional failureThreshold = default; + Optional successThreshold = default; + Optional timeoutSeconds = default; + Optional periodSeconds = default; + Optional initialDelaySeconds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failureThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + failureThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("successThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + successThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeoutSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + timeoutSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("periodSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + periodSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("initialDelaySeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + initialDelaySeconds = property.Value.GetInt32(); + continue; + } + } + return new AKSServiceCreateRequestLivenessProbeRequirements(Optional.ToNullable(failureThreshold), Optional.ToNullable(successThreshold), Optional.ToNullable(timeoutSeconds), Optional.ToNullable(periodSeconds), Optional.ToNullable(initialDelaySeconds)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.cs new file mode 100644 index 000000000000..878a83ca9696 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceCreateRequestLivenessProbeRequirements.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The liveness probe requirements. + public partial class AKSServiceCreateRequestLivenessProbeRequirements : LivenessProbeRequirements + { + /// Initializes a new instance of AKSServiceCreateRequestLivenessProbeRequirements. + public AKSServiceCreateRequestLivenessProbeRequirements() + { + } + + /// Initializes a new instance of AKSServiceCreateRequestLivenessProbeRequirements. + /// The number of failures to allow before returning an unhealthy status. + /// The number of successful probes before returning a healthy status. + /// The probe timeout in seconds. + /// The length of time between probes in seconds. + /// The delay before the first probe in seconds. + internal AKSServiceCreateRequestLivenessProbeRequirements(int? failureThreshold, int? successThreshold, int? timeoutSeconds, int? periodSeconds, int? initialDelaySeconds) : base(failureThreshold, successThreshold, timeoutSeconds, periodSeconds, initialDelaySeconds) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.Serialization.cs new file mode 100644 index 000000000000..208ac25b5b36 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.Serialization.cs @@ -0,0 +1,468 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Models)) + { + writer.WritePropertyName("models"); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ContainerResourceRequirements)) + { + writer.WritePropertyName("containerResourceRequirements"); + writer.WriteObjectValue(ContainerResourceRequirements); + } + if (Optional.IsDefined(MaxConcurrentRequestsPerContainer)) + { + writer.WritePropertyName("maxConcurrentRequestsPerContainer"); + writer.WriteNumberValue(MaxConcurrentRequestsPerContainer.Value); + } + if (Optional.IsDefined(MaxQueueWaitMs)) + { + writer.WritePropertyName("maxQueueWaitMs"); + writer.WriteNumberValue(MaxQueueWaitMs.Value); + } + if (Optional.IsDefined(ComputeName)) + { + writer.WritePropertyName("computeName"); + writer.WriteStringValue(ComputeName); + } + if (Optional.IsDefined(Namespace)) + { + writer.WritePropertyName("namespace"); + writer.WriteStringValue(Namespace); + } + if (Optional.IsDefined(NumReplicas)) + { + writer.WritePropertyName("numReplicas"); + writer.WriteNumberValue(NumReplicas.Value); + } + if (Optional.IsDefined(DataCollection)) + { + writer.WritePropertyName("dataCollection"); + writer.WriteObjectValue(DataCollection); + } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } + if (Optional.IsDefined(AutoScaler)) + { + writer.WritePropertyName("autoScaler"); + writer.WriteObjectValue(AutoScaler); + } + if (Optional.IsDefined(ScoringTimeoutMs)) + { + writer.WritePropertyName("scoringTimeoutMs"); + writer.WriteNumberValue(ScoringTimeoutMs.Value); + } + if (Optional.IsDefined(LivenessProbeRequirements)) + { + writer.WritePropertyName("livenessProbeRequirements"); + writer.WriteObjectValue(LivenessProbeRequirements); + } + if (Optional.IsDefined(AuthEnabled)) + { + writer.WritePropertyName("authEnabled"); + writer.WriteBooleanValue(AuthEnabled.Value); + } + if (Optional.IsDefined(AadAuthEnabled)) + { + writer.WritePropertyName("aadAuthEnabled"); + writer.WriteBooleanValue(AadAuthEnabled.Value); + } + if (Optional.IsDefined(EnvironmentImageRequest)) + { + writer.WritePropertyName("environmentImageRequest"); + writer.WriteObjectValue(EnvironmentImageRequest); + } + if (Optional.IsDefined(IsDefault)) + { + writer.WritePropertyName("isDefault"); + writer.WriteBooleanValue(IsDefault.Value); + } + if (Optional.IsDefined(TrafficPercentile)) + { + writer.WritePropertyName("trafficPercentile"); + writer.WriteNumberValue(TrafficPercentile.Value); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(DeploymentType)) + { + writer.WritePropertyName("deploymentType"); + writer.WriteStringValue(DeploymentType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static AKSServiceResponse DeserializeAKSServiceResponse(JsonElement element) + { + Optional> models = default; + Optional containerResourceRequirements = default; + Optional maxConcurrentRequestsPerContainer = default; + Optional maxQueueWaitMs = default; + Optional computeName = default; + Optional @namespace = default; + Optional numReplicas = default; + Optional dataCollection = default; + Optional appInsightsEnabled = default; + Optional autoScaler = default; + Optional scoringUri = default; + Optional deploymentStatus = default; + Optional scoringTimeoutMs = default; + Optional livenessProbeRequirements = default; + Optional authEnabled = default; + Optional aadAuthEnabled = default; + Optional swaggerUri = default; + Optional> modelConfigMap = default; + Optional environmentImageRequest = default; + Optional isDefault = default; + Optional trafficPercentile = default; + Optional type = default; + Optional description = default; + Optional> kvTags = default; + Optional> properties = default; + Optional state = default; + Optional error = default; + ComputeEnvironmentType computeType = default; + Optional deploymentType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("models")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Model.DeserializeModel(item)); + } + models = array; + continue; + } + if (property.NameEquals("containerResourceRequirements")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + containerResourceRequirements = ContainerResourceRequirements.DeserializeContainerResourceRequirements(property.Value); + continue; + } + if (property.NameEquals("maxConcurrentRequestsPerContainer")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxConcurrentRequestsPerContainer = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxQueueWaitMs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxQueueWaitMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("computeName")) + { + computeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("namespace")) + { + @namespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("numReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + numReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataCollection")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + dataCollection = ModelDataCollection.DeserializeModelDataCollection(property.Value); + continue; + } + if (property.NameEquals("appInsightsEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + appInsightsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("autoScaler")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoScaler = AutoScaler.DeserializeAutoScaler(property.Value); + continue; + } + if (property.NameEquals("scoringUri")) + { + scoringUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentStatus")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + deploymentStatus = AKSReplicaStatus.DeserializeAKSReplicaStatus(property.Value); + continue; + } + if (property.NameEquals("scoringTimeoutMs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scoringTimeoutMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("livenessProbeRequirements")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + livenessProbeRequirements = LivenessProbeRequirements.DeserializeLivenessProbeRequirements(property.Value); + continue; + } + if (property.NameEquals("authEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + authEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("aadAuthEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + aadAuthEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("swaggerUri")) + { + swaggerUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelConfigMap")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + modelConfigMap = dictionary; + continue; + } + if (property.NameEquals("environmentImageRequest")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environmentImageRequest = EnvironmentImageResponse.DeserializeEnvironmentImageResponse(property.Value); + continue; + } + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("trafficPercentile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + trafficPercentile = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + type = new VariantType(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("kvTags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + kvTags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new WebServiceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = ErrorResponse.DeserializeErrorResponse(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + deploymentType = new DeploymentType(property.Value.GetString()); + continue; + } + } + return new AKSServiceResponse(description.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToNullable(state), error.Value, computeType, Optional.ToNullable(deploymentType), Optional.ToNullable(isDefault), Optional.ToNullable(trafficPercentile), Optional.ToNullable(type), Optional.ToList(models), containerResourceRequirements.Value, Optional.ToNullable(maxConcurrentRequestsPerContainer), Optional.ToNullable(maxQueueWaitMs), computeName.Value, @namespace.Value, Optional.ToNullable(numReplicas), dataCollection.Value, Optional.ToNullable(appInsightsEnabled), autoScaler.Value, scoringUri.Value, deploymentStatus.Value, Optional.ToNullable(scoringTimeoutMs), livenessProbeRequirements.Value, Optional.ToNullable(authEnabled), Optional.ToNullable(aadAuthEnabled), swaggerUri.Value, Optional.ToDictionary(modelConfigMap), environmentImageRequest.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.cs new file mode 100644 index 000000000000..40355bdf43ea --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponse.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The response for an AKS service. + public partial class AKSServiceResponse : AKSVariantResponse + { + /// Initializes a new instance of AKSServiceResponse. + public AKSServiceResponse() + { + Models = new ChangeTrackingList(); + ModelConfigMap = new ChangeTrackingDictionary(); + ComputeType = ComputeEnvironmentType.AKS; + } + + /// Initializes a new instance of AKSServiceResponse. + /// The service description. + /// The service tag dictionary. Tags are mutable. + /// The service property dictionary. Properties are immutable. + /// The current state of the service. + /// The error details. + /// The compute environment type for the service. + /// The deployment type for the service. + /// Is this the default variant. + /// The amount of traffic variant receives. + /// The type of the variant. + /// The list of models. + /// The container resource requirements. + /// The maximum number of concurrent requests per container. + /// Maximum time a request will wait in the queue (in milliseconds). After this time, the service will return 503 (Service Unavailable). + /// The name of the compute resource. + /// The Kubernetes namespace of the deployment. + /// The number of replicas on the cluster. + /// Details of the data collection options specified. + /// Whether or not Application Insights is enabled. + /// The auto scaler properties. + /// The Uri for sending scoring requests. + /// The deployment status. + /// The scoring timeout in milliseconds. + /// The liveness probe requirements. + /// Whether or not authentication is enabled. + /// Whether or not AAD authentication is enabled. + /// The Uri for sending swagger requests. + /// Details on the models and configurations. + /// The Environment, models and assets used for inferencing. + internal AKSServiceResponse(string description, IDictionary kvTags, IDictionary properties, WebServiceState? state, ErrorResponse error, ComputeEnvironmentType computeType, DeploymentType? deploymentType, bool? isDefault, float? trafficPercentile, VariantType? type, IList models, ContainerResourceRequirements containerResourceRequirements, int? maxConcurrentRequestsPerContainer, int? maxQueueWaitMs, string computeName, string @namespace, int? numReplicas, ModelDataCollection dataCollection, bool? appInsightsEnabled, AutoScaler autoScaler, string scoringUri, AKSReplicaStatus deploymentStatus, int? scoringTimeoutMs, LivenessProbeRequirements livenessProbeRequirements, bool? authEnabled, bool? aadAuthEnabled, string swaggerUri, IReadOnlyDictionary modelConfigMap, EnvironmentImageResponse environmentImageRequest) : base(description, kvTags, properties, state, error, computeType, deploymentType, isDefault, trafficPercentile, type) + { + Models = models; + ContainerResourceRequirements = containerResourceRequirements; + MaxConcurrentRequestsPerContainer = maxConcurrentRequestsPerContainer; + MaxQueueWaitMs = maxQueueWaitMs; + ComputeName = computeName; + Namespace = @namespace; + NumReplicas = numReplicas; + DataCollection = dataCollection; + AppInsightsEnabled = appInsightsEnabled; + AutoScaler = autoScaler; + ScoringUri = scoringUri; + DeploymentStatus = deploymentStatus; + ScoringTimeoutMs = scoringTimeoutMs; + LivenessProbeRequirements = livenessProbeRequirements; + AuthEnabled = authEnabled; + AadAuthEnabled = aadAuthEnabled; + SwaggerUri = swaggerUri; + ModelConfigMap = modelConfigMap; + EnvironmentImageRequest = environmentImageRequest; + ComputeType = computeType; + } + + /// The list of models. + public IList Models { get; } + /// The container resource requirements. + public ContainerResourceRequirements ContainerResourceRequirements { get; set; } + /// The maximum number of concurrent requests per container. + public int? MaxConcurrentRequestsPerContainer { get; set; } + /// Maximum time a request will wait in the queue (in milliseconds). After this time, the service will return 503 (Service Unavailable). + public int? MaxQueueWaitMs { get; set; } + /// The name of the compute resource. + public string ComputeName { get; set; } + /// The Kubernetes namespace of the deployment. + public string Namespace { get; set; } + /// The number of replicas on the cluster. + public int? NumReplicas { get; set; } + /// Details of the data collection options specified. + public ModelDataCollection DataCollection { get; set; } + /// Whether or not Application Insights is enabled. + public bool? AppInsightsEnabled { get; set; } + /// The auto scaler properties. + public AutoScaler AutoScaler { get; set; } + /// The Uri for sending scoring requests. + public string ScoringUri { get; } + /// The deployment status. + public AKSReplicaStatus DeploymentStatus { get; } + /// The scoring timeout in milliseconds. + public int? ScoringTimeoutMs { get; set; } + /// The liveness probe requirements. + public LivenessProbeRequirements LivenessProbeRequirements { get; set; } + /// Whether or not authentication is enabled. + public bool? AuthEnabled { get; set; } + /// Whether or not AAD authentication is enabled. + public bool? AadAuthEnabled { get; set; } + /// The Uri for sending swagger requests. + public string SwaggerUri { get; } + /// Details on the models and configurations. + public IReadOnlyDictionary ModelConfigMap { get; } + /// The Environment, models and assets used for inferencing. + public EnvironmentImageResponse EnvironmentImageRequest { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.Serialization.cs new file mode 100644 index 000000000000..4ead8067ca66 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceResponseAutoScaler : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AutoscaleEnabled)) + { + writer.WritePropertyName("autoscaleEnabled"); + writer.WriteBooleanValue(AutoscaleEnabled.Value); + } + if (Optional.IsDefined(MinReplicas)) + { + writer.WritePropertyName("minReplicas"); + writer.WriteNumberValue(MinReplicas.Value); + } + if (Optional.IsDefined(MaxReplicas)) + { + writer.WritePropertyName("maxReplicas"); + writer.WriteNumberValue(MaxReplicas.Value); + } + if (Optional.IsDefined(TargetUtilization)) + { + writer.WritePropertyName("targetUtilization"); + writer.WriteNumberValue(TargetUtilization.Value); + } + if (Optional.IsDefined(RefreshPeriodInSeconds)) + { + writer.WritePropertyName("refreshPeriodInSeconds"); + writer.WriteNumberValue(RefreshPeriodInSeconds.Value); + } + writer.WriteEndObject(); + } + + internal static AKSServiceResponseAutoScaler DeserializeAKSServiceResponseAutoScaler(JsonElement element) + { + Optional autoscaleEnabled = default; + Optional minReplicas = default; + Optional maxReplicas = default; + Optional targetUtilization = default; + Optional refreshPeriodInSeconds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoscaleEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoscaleEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("minReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetUtilization")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + targetUtilization = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("refreshPeriodInSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + refreshPeriodInSeconds = property.Value.GetInt32(); + continue; + } + } + return new AKSServiceResponseAutoScaler(Optional.ToNullable(autoscaleEnabled), Optional.ToNullable(minReplicas), Optional.ToNullable(maxReplicas), Optional.ToNullable(targetUtilization), Optional.ToNullable(refreshPeriodInSeconds)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.cs new file mode 100644 index 000000000000..7c7acead409b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseAutoScaler.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The auto scaler properties. + public partial class AKSServiceResponseAutoScaler : AutoScaler + { + /// Initializes a new instance of AKSServiceResponseAutoScaler. + public AKSServiceResponseAutoScaler() + { + } + + /// Initializes a new instance of AKSServiceResponseAutoScaler. + /// Option to enable/disable auto scaling. + /// The minimum number of replicas to scale down to. + /// The maximum number of replicas in the cluster. + /// The target utilization percentage to use for determining whether to scale the cluster. + /// The amount of seconds to wait between auto scale updates. + internal AKSServiceResponseAutoScaler(bool? autoscaleEnabled, int? minReplicas, int? maxReplicas, int? targetUtilization, int? refreshPeriodInSeconds) : base(autoscaleEnabled, minReplicas, maxReplicas, targetUtilization, refreshPeriodInSeconds) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.Serialization.cs new file mode 100644 index 000000000000..f64299c4b30c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceResponseDataCollection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EventHubEnabled)) + { + writer.WritePropertyName("eventHubEnabled"); + writer.WriteBooleanValue(EventHubEnabled.Value); + } + if (Optional.IsDefined(StorageEnabled)) + { + writer.WritePropertyName("storageEnabled"); + writer.WriteBooleanValue(StorageEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static AKSServiceResponseDataCollection DeserializeAKSServiceResponseDataCollection(JsonElement element) + { + Optional eventHubEnabled = default; + Optional storageEnabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventHubEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + eventHubEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("storageEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + storageEnabled = property.Value.GetBoolean(); + continue; + } + } + return new AKSServiceResponseDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.cs new file mode 100644 index 000000000000..1b77bc9c5a8a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDataCollection.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of the data collection options specified. + public partial class AKSServiceResponseDataCollection : ModelDataCollection + { + /// Initializes a new instance of AKSServiceResponseDataCollection. + public AKSServiceResponseDataCollection() + { + } + + /// Initializes a new instance of AKSServiceResponseDataCollection. + /// Option for enabling/disabling Event Hub. + /// Option for enabling/disabling storage. + internal AKSServiceResponseDataCollection(bool? eventHubEnabled, bool? storageEnabled) : base(eventHubEnabled, storageEnabled) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.Serialization.cs new file mode 100644 index 000000000000..4f97bd68e9da --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceResponseDeploymentStatus + { + internal static AKSServiceResponseDeploymentStatus DeserializeAKSServiceResponseDeploymentStatus(JsonElement element) + { + Optional desiredReplicas = default; + Optional updatedReplicas = default; + Optional availableReplicas = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("desiredReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + desiredReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("updatedReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + updatedReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + availableReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = ErrorResponse.DeserializeErrorResponse(property.Value); + continue; + } + } + return new AKSServiceResponseDeploymentStatus(Optional.ToNullable(desiredReplicas), Optional.ToNullable(updatedReplicas), Optional.ToNullable(availableReplicas), error.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.cs new file mode 100644 index 000000000000..e6d5fe569d36 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseDeploymentStatus.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The deployment status. + public partial class AKSServiceResponseDeploymentStatus : AKSReplicaStatus + { + /// Initializes a new instance of AKSServiceResponseDeploymentStatus. + internal AKSServiceResponseDeploymentStatus() + { + } + + /// Initializes a new instance of AKSServiceResponseDeploymentStatus. + /// The desired number of replicas. + /// The number of updated replicas. + /// The number of available replicas. + /// The error details. + internal AKSServiceResponseDeploymentStatus(int? desiredReplicas, int? updatedReplicas, int? availableReplicas, ErrorResponse error) : base(desiredReplicas, updatedReplicas, availableReplicas, error) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.Serialization.cs new file mode 100644 index 000000000000..bb94390d4a5f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceResponseEnvironmentImageRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DriverProgram)) + { + writer.WritePropertyName("driverProgram"); + writer.WriteStringValue(DriverProgram); + } + if (Optional.IsCollectionDefined(Assets)) + { + writer.WritePropertyName("assets"); + writer.WriteStartArray(); + foreach (var item in Assets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModelIds)) + { + writer.WritePropertyName("modelIds"); + writer.WriteStartArray(); + foreach (var item in ModelIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Models)) + { + writer.WritePropertyName("models"); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Environment)) + { + writer.WritePropertyName("environment"); + writer.WriteObjectValue(Environment); + } + if (Optional.IsDefined(EnvironmentReference)) + { + writer.WritePropertyName("environmentReference"); + writer.WriteObjectValue(EnvironmentReference); + } + writer.WriteEndObject(); + } + + internal static AKSServiceResponseEnvironmentImageRequest DeserializeAKSServiceResponseEnvironmentImageRequest(JsonElement element) + { + Optional driverProgram = default; + Optional> assets = default; + Optional> modelIds = default; + Optional> models = default; + Optional environment = default; + Optional environmentReference = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("driverProgram")) + { + driverProgram = property.Value.GetString(); + continue; + } + if (property.NameEquals("assets")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImageAsset.DeserializeImageAsset(item)); + } + assets = array; + continue; + } + if (property.NameEquals("modelIds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + modelIds = array; + continue; + } + if (property.NameEquals("models")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Model.DeserializeModel(item)); + } + models = array; + continue; + } + if (property.NameEquals("environment")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environment = ModelEnvironmentDefinitionResponse.DeserializeModelEnvironmentDefinitionResponse(property.Value); + continue; + } + if (property.NameEquals("environmentReference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environmentReference = EnvironmentReference.DeserializeEnvironmentReference(property.Value); + continue; + } + } + return new AKSServiceResponseEnvironmentImageRequest(driverProgram.Value, Optional.ToList(assets), Optional.ToList(modelIds), Optional.ToList(models), environment.Value, environmentReference.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.cs new file mode 100644 index 000000000000..2ff9dc136434 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseEnvironmentImageRequest.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Environment, models and assets used for inferencing. + public partial class AKSServiceResponseEnvironmentImageRequest : EnvironmentImageResponse + { + /// Initializes a new instance of AKSServiceResponseEnvironmentImageRequest. + public AKSServiceResponseEnvironmentImageRequest() + { + } + + /// Initializes a new instance of AKSServiceResponseEnvironmentImageRequest. + /// The name of the driver file. + /// The list of assets. + /// The list of model Ids. + /// The list of models. + /// The details of the AZURE ML environment. + /// The unique identifying details of the AZURE ML environment. + internal AKSServiceResponseEnvironmentImageRequest(string driverProgram, IList assets, IList modelIds, IList models, ModelEnvironmentDefinitionResponse environment, EnvironmentReference environmentReference) : base(driverProgram, assets, modelIds, models, environment, environmentReference) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.Serialization.cs new file mode 100644 index 000000000000..4065039758b3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSServiceResponseLivenessProbeRequirements : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(FailureThreshold)) + { + writer.WritePropertyName("failureThreshold"); + writer.WriteNumberValue(FailureThreshold.Value); + } + if (Optional.IsDefined(SuccessThreshold)) + { + writer.WritePropertyName("successThreshold"); + writer.WriteNumberValue(SuccessThreshold.Value); + } + if (Optional.IsDefined(TimeoutSeconds)) + { + writer.WritePropertyName("timeoutSeconds"); + writer.WriteNumberValue(TimeoutSeconds.Value); + } + if (Optional.IsDefined(PeriodSeconds)) + { + writer.WritePropertyName("periodSeconds"); + writer.WriteNumberValue(PeriodSeconds.Value); + } + if (Optional.IsDefined(InitialDelaySeconds)) + { + writer.WritePropertyName("initialDelaySeconds"); + writer.WriteNumberValue(InitialDelaySeconds.Value); + } + writer.WriteEndObject(); + } + + internal static AKSServiceResponseLivenessProbeRequirements DeserializeAKSServiceResponseLivenessProbeRequirements(JsonElement element) + { + Optional failureThreshold = default; + Optional successThreshold = default; + Optional timeoutSeconds = default; + Optional periodSeconds = default; + Optional initialDelaySeconds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failureThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + failureThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("successThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + successThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeoutSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + timeoutSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("periodSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + periodSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("initialDelaySeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + initialDelaySeconds = property.Value.GetInt32(); + continue; + } + } + return new AKSServiceResponseLivenessProbeRequirements(Optional.ToNullable(failureThreshold), Optional.ToNullable(successThreshold), Optional.ToNullable(timeoutSeconds), Optional.ToNullable(periodSeconds), Optional.ToNullable(initialDelaySeconds)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.cs new file mode 100644 index 000000000000..5b4aca36f96c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSServiceResponseLivenessProbeRequirements.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The liveness probe requirements. + public partial class AKSServiceResponseLivenessProbeRequirements : LivenessProbeRequirements + { + /// Initializes a new instance of AKSServiceResponseLivenessProbeRequirements. + public AKSServiceResponseLivenessProbeRequirements() + { + } + + /// Initializes a new instance of AKSServiceResponseLivenessProbeRequirements. + /// The number of failures to allow before returning an unhealthy status. + /// The number of successful probes before returning a healthy status. + /// The probe timeout in seconds. + /// The length of time between probes in seconds. + /// The delay before the first probe in seconds. + internal AKSServiceResponseLivenessProbeRequirements(int? failureThreshold, int? successThreshold, int? timeoutSeconds, int? periodSeconds, int? initialDelaySeconds) : base(failureThreshold, successThreshold, timeoutSeconds, periodSeconds, initialDelaySeconds) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.Serialization.cs new file mode 100644 index 000000000000..b73ab41ecec8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AKSVariantResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsDefault)) + { + writer.WritePropertyName("isDefault"); + writer.WriteBooleanValue(IsDefault.Value); + } + if (Optional.IsDefined(TrafficPercentile)) + { + writer.WritePropertyName("trafficPercentile"); + writer.WriteNumberValue(TrafficPercentile.Value); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(DeploymentType)) + { + writer.WritePropertyName("deploymentType"); + writer.WriteStringValue(DeploymentType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static AKSVariantResponse DeserializeAKSVariantResponse(JsonElement element) + { + if (element.TryGetProperty("computeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AKS": return AKSServiceResponse.DeserializeAKSServiceResponse(element); + } + } + Optional isDefault = default; + Optional trafficPercentile = default; + Optional type = default; + Optional description = default; + Optional> kvTags = default; + Optional> properties = default; + Optional state = default; + Optional error = default; + ComputeEnvironmentType computeType = default; + Optional deploymentType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("trafficPercentile")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + trafficPercentile = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + type = new VariantType(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("kvTags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + kvTags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new WebServiceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = ErrorResponse.DeserializeErrorResponse(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + deploymentType = new DeploymentType(property.Value.GetString()); + continue; + } + } + return new AKSVariantResponse(description.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToNullable(state), error.Value, computeType, Optional.ToNullable(deploymentType), Optional.ToNullable(isDefault), Optional.ToNullable(trafficPercentile), Optional.ToNullable(type)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.cs new file mode 100644 index 000000000000..289a34b71fdf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AKSVariantResponse.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The response for an AKS variant. + public partial class AKSVariantResponse : ServiceResponseBase + { + /// Initializes a new instance of AKSVariantResponse. + public AKSVariantResponse() + { + ComputeType = new ComputeEnvironmentType("Custom"); + } + + /// Initializes a new instance of AKSVariantResponse. + /// The service description. + /// The service tag dictionary. Tags are mutable. + /// The service property dictionary. Properties are immutable. + /// The current state of the service. + /// The error details. + /// The compute environment type for the service. + /// The deployment type for the service. + /// Is this the default variant. + /// The amount of traffic variant receives. + /// The type of the variant. + internal AKSVariantResponse(string description, IDictionary kvTags, IDictionary properties, WebServiceState? state, ErrorResponse error, ComputeEnvironmentType computeType, DeploymentType? deploymentType, bool? isDefault, float? trafficPercentile, VariantType? type) : base(description, kvTags, properties, state, error, computeType, deploymentType) + { + IsDefault = isDefault; + TrafficPercentile = trafficPercentile; + Type = type; + ComputeType = computeType; + } + + /// Is this the default variant. + public bool? IsDefault { get; set; } + /// The amount of traffic variant receives. + public float? TrafficPercentile { get; set; } + /// The type of the variant. + public VariantType? Type { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.Serialization.cs new file mode 100644 index 000000000000..fb4322660044 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AccountKeySection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Key)) + { + writer.WritePropertyName("key"); + writer.WriteStringValue(Key); + } + writer.WriteEndObject(); + } + + internal static AccountKeySection DeserializeAccountKeySection(JsonElement element) + { + Optional key = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key")) + { + key = property.Value.GetString(); + continue; + } + } + return new AccountKeySection(key.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.cs new file mode 100644 index 000000000000..00a8d220a293 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AccountKeySection.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The AccountKeySection. + public partial class AccountKeySection + { + /// Initializes a new instance of AccountKeySection. + public AccountKeySection() + { + } + + /// Initializes a new instance of AccountKeySection. + /// Storage account key. + internal AccountKeySection(string key) + { + Key = key; + } + + /// Storage account key. + public string Key { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecrets.Serialization.cs new file mode 100644 index 000000000000..6bd5ec4fe22a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecrets.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AksComputeSecrets + { + internal static AksComputeSecrets DeserializeAksComputeSecrets(JsonElement element) + { + Optional userKubeConfig = default; + Optional adminKubeConfig = default; + Optional imagePullSecretName = default; + ComputeType computeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userKubeConfig")) + { + userKubeConfig = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminKubeConfig")) + { + adminKubeConfig = property.Value.GetString(); + continue; + } + if (property.NameEquals("imagePullSecretName")) + { + imagePullSecretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + } + return new AksComputeSecrets(computeType, userKubeConfig.Value, adminKubeConfig.Value, imagePullSecretName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecrets.cs new file mode 100644 index 000000000000..fa309dbacfee --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksComputeSecrets.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Secrets related to a Machine Learning compute based on AKS. + public partial class AksComputeSecrets : ComputeSecrets + { + /// Initializes a new instance of AksComputeSecrets. + internal AksComputeSecrets() + { + ComputeType = ComputeType.AKS; + } + + /// Initializes a new instance of AksComputeSecrets. + /// The type of compute. + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + /// Image registry pull secret. + internal AksComputeSecrets(ComputeType computeType, string userKubeConfig, string adminKubeConfig, string imagePullSecretName) : base(computeType) + { + UserKubeConfig = userKubeConfig; + AdminKubeConfig = adminKubeConfig; + ImagePullSecretName = imagePullSecretName; + ComputeType = computeType; + } + + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + public string UserKubeConfig { get; } + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + public string AdminKubeConfig { get; } + /// Image registry pull secret. + public string ImagePullSecretName { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksNetworkingConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksNetworkingConfiguration.Serialization.cs new file mode 100644 index 000000000000..dc5dcacea7d6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksNetworkingConfiguration.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AksNetworkingConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SubnetId)) + { + writer.WritePropertyName("subnetId"); + writer.WriteStringValue(SubnetId); + } + if (Optional.IsDefined(ServiceCidr)) + { + writer.WritePropertyName("serviceCidr"); + writer.WriteStringValue(ServiceCidr); + } + if (Optional.IsDefined(DnsServiceIP)) + { + writer.WritePropertyName("dnsServiceIP"); + writer.WriteStringValue(DnsServiceIP); + } + if (Optional.IsDefined(DockerBridgeCidr)) + { + writer.WritePropertyName("dockerBridgeCidr"); + writer.WriteStringValue(DockerBridgeCidr); + } + writer.WriteEndObject(); + } + + internal static AksNetworkingConfiguration DeserializeAksNetworkingConfiguration(JsonElement element) + { + Optional subnetId = default; + Optional serviceCidr = default; + Optional dnsServiceIP = default; + Optional dockerBridgeCidr = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId")) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceCidr")) + { + serviceCidr = property.Value.GetString(); + continue; + } + if (property.NameEquals("dnsServiceIP")) + { + dnsServiceIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("dockerBridgeCidr")) + { + dockerBridgeCidr = property.Value.GetString(); + continue; + } + } + return new AksNetworkingConfiguration(subnetId.Value, serviceCidr.Value, dnsServiceIP.Value, dockerBridgeCidr.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksNetworkingConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksNetworkingConfiguration.cs new file mode 100644 index 000000000000..3e100bab25b5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AksNetworkingConfiguration.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Advance configuration for AKS networking. + public partial class AksNetworkingConfiguration + { + /// Initializes a new instance of AksNetworkingConfiguration. + public AksNetworkingConfiguration() + { + } + + /// Initializes a new instance of AksNetworkingConfiguration. + /// Virtual network subnet resource ID the compute nodes belong to. + /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. + /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. + /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. + internal AksNetworkingConfiguration(string subnetId, string serviceCidr, string dnsServiceIP, string dockerBridgeCidr) + { + SubnetId = subnetId; + ServiceCidr = serviceCidr; + DnsServiceIP = dnsServiceIP; + DockerBridgeCidr = dockerBridgeCidr; + } + + /// Virtual network subnet resource ID the compute nodes belong to. + public string SubnetId { get; set; } + /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. + public string ServiceCidr { get; set; } + /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. + public string DnsServiceIP { get; set; } + /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. + public string DockerBridgeCidr { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AllocationState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AllocationState.cs new file mode 100644 index 000000000000..f2d656738dff --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AllocationState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// 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. + public readonly partial struct AllocationState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public AllocationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SteadyValue = "Steady"; + private const string ResizingValue = "Resizing"; + + /// Steady. + public static AllocationState Steady { get; } = new AllocationState(SteadyValue); + /// Resizing. + public static AllocationState Resizing { get; } = new AllocationState(ResizingValue); + /// Determines if two values are the same. + public static bool operator ==(AllocationState left, AllocationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AllocationState left, AllocationState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AllocationState(string value) => new AllocationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AllocationState other && Equals(other); + /// + public bool Equals(AllocationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.Serialization.cs new file mode 100644 index 000000000000..7a39249a4cef --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AmlCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static AmlCompute DeserializeAmlCompute(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = AmlComputeProperties.DeserializeAmlComputeProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new AmlCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.cs new file mode 100644 index 000000000000..81221c0b6910 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlCompute.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// An Azure Machine Learning compute. + public partial class AmlCompute : Compute + { + /// Initializes a new instance of AmlCompute. + public AmlCompute() + { + ComputeType = ComputeType.AmlCompute; + } + + /// Initializes a new instance of AmlCompute. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// AML Compute properties. + internal AmlCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, AmlComputeProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + { + Properties = properties; + ComputeType = computeType; + } + + /// AML Compute properties. + public AmlComputeProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodeInformation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodeInformation.Serialization.cs new file mode 100644 index 000000000000..472c11e8fde5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodeInformation.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AmlComputeNodeInformation + { + internal static AmlComputeNodeInformation DeserializeAmlComputeNodeInformation(JsonElement element) + { + Optional nodeId = default; + Optional privateIpAddress = default; + Optional publicIpAddress = default; + Optional port = default; + Optional nodeState = default; + Optional runId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeId")) + { + nodeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateIpAddress")) + { + privateIpAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicIpAddress")) + { + publicIpAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("port")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + port = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + nodeState = new NodeState(property.Value.GetString()); + continue; + } + if (property.NameEquals("runId")) + { + runId = property.Value.GetString(); + continue; + } + } + return new AmlComputeNodeInformation(nodeId.Value, privateIpAddress.Value, publicIpAddress.Value, Optional.ToNullable(port), Optional.ToNullable(nodeState), runId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodeInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodeInformation.cs new file mode 100644 index 000000000000..67708eeddc7d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodeInformation.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Compute node information related to a AmlCompute. + public partial class AmlComputeNodeInformation + { + /// Initializes a new instance of AmlComputeNodeInformation. + internal AmlComputeNodeInformation() + { + } + + /// Initializes a new instance of AmlComputeNodeInformation. + /// ID of the compute node. + /// Private IP address of the compute node. + /// Public IP address of the compute node. + /// SSH port number of the node. + /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + /// ID of the Experiment running on the node, if any else null. + internal AmlComputeNodeInformation(string nodeId, string privateIpAddress, string publicIpAddress, int? port, NodeState? nodeState, string runId) + { + NodeId = nodeId; + PrivateIpAddress = privateIpAddress; + PublicIpAddress = publicIpAddress; + Port = port; + NodeState = nodeState; + RunId = runId; + } + + /// ID of the compute node. + public string NodeId { get; } + /// Private IP address of the compute node. + public string PrivateIpAddress { get; } + /// Public IP address of the compute node. + public string PublicIpAddress { get; } + /// SSH port number of the node. + public int? Port { get; } + /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + public NodeState? NodeState { get; } + /// ID of the Experiment running on the node, if any else null. + public string RunId { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.Serialization.cs new file mode 100644 index 000000000000..e271e077cc6e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AmlComputeNodesInformation + { + internal static AmlComputeNodesInformation DeserializeAmlComputeNodesInformation(JsonElement element) + { + Optional> nodes = default; + ComputeType computeType = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AmlComputeNodeInformation.DeserializeAmlComputeNodeInformation(item)); + } + nodes = array; + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new AmlComputeNodesInformation(computeType, nextLink.Value, Optional.ToList(nodes)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.cs new file mode 100644 index 000000000000..c821a72467b5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeNodesInformation.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Compute node information related to a AmlCompute. + public partial class AmlComputeNodesInformation : ComputeNodesInformation + { + /// Initializes a new instance of AmlComputeNodesInformation. + internal AmlComputeNodesInformation() + { + Nodes = new ChangeTrackingList(); + ComputeType = ComputeType.AmlCompute; + } + + /// Initializes a new instance of AmlComputeNodesInformation. + /// The type of compute. + /// The continuation token. + /// The collection of returned AmlCompute nodes details. + internal AmlComputeNodesInformation(ComputeType computeType, string nextLink, IReadOnlyList nodes) : base(computeType, nextLink) + { + Nodes = nodes; + ComputeType = computeType; + } + + /// The collection of returned AmlCompute nodes details. + public IReadOnlyList Nodes { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.Serialization.cs new file mode 100644 index 000000000000..e6c28e487c92 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.Serialization.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AmlComputeProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(OsType)) + { + writer.WritePropertyName("osType"); + writer.WriteStringValue(OsType.Value.ToString()); + } + if (Optional.IsDefined(VmSize)) + { + writer.WritePropertyName("vmSize"); + writer.WriteStringValue(VmSize); + } + if (Optional.IsDefined(VmPriority)) + { + writer.WritePropertyName("vmPriority"); + writer.WriteStringValue(VmPriority.Value.ToString()); + } + if (Optional.IsDefined(VirtualMachineImage)) + { + writer.WritePropertyName("virtualMachineImage"); + writer.WriteObjectValue(VirtualMachineImage); + } + if (Optional.IsDefined(IsolatedNetwork)) + { + writer.WritePropertyName("isolatedNetwork"); + writer.WriteBooleanValue(IsolatedNetwork.Value); + } + if (Optional.IsDefined(ScaleSettings)) + { + writer.WritePropertyName("scaleSettings"); + writer.WriteObjectValue(ScaleSettings); + } + if (Optional.IsDefined(UserAccountCredentials)) + { + writer.WritePropertyName("userAccountCredentials"); + writer.WriteObjectValue(UserAccountCredentials); + } + if (Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"); + writer.WriteObjectValue(Subnet); + } + if (Optional.IsDefined(RemoteLoginPortPublicAccess)) + { + writer.WritePropertyName("remoteLoginPortPublicAccess"); + writer.WriteStringValue(RemoteLoginPortPublicAccess.Value.ToString()); + } + if (Optional.IsDefined(EnableNodePublicIp)) + { + writer.WritePropertyName("enableNodePublicIp"); + writer.WriteBooleanValue(EnableNodePublicIp.Value); + } + writer.WriteEndObject(); + } + + internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement element) + { + Optional osType = default; + Optional vmSize = default; + Optional vmPriority = default; + Optional virtualMachineImage = default; + Optional isolatedNetwork = default; + Optional scaleSettings = default; + Optional userAccountCredentials = default; + Optional subnet = default; + Optional remoteLoginPortPublicAccess = default; + Optional allocationState = default; + Optional allocationStateTransitionTime = default; + Optional> errors = default; + Optional currentNodeCount = default; + Optional targetNodeCount = default; + Optional nodeStateCounts = default; + Optional enableNodePublicIp = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("osType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + osType = new OsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("vmSize")) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmPriority")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + vmPriority = new VmPriority(property.Value.GetString()); + continue; + } + if (property.NameEquals("virtualMachineImage")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + virtualMachineImage = VirtualMachineImage.DeserializeVirtualMachineImage(property.Value); + continue; + } + if (property.NameEquals("isolatedNetwork")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isolatedNetwork = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("scaleSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scaleSettings = ScaleSettings.DeserializeScaleSettings(property.Value); + continue; + } + if (property.NameEquals("userAccountCredentials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + userAccountCredentials = UserAccountCredentials.DeserializeUserAccountCredentials(property.Value); + continue; + } + if (property.NameEquals("subnet")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + subnet = ResourceId.DeserializeResourceId(property.Value); + continue; + } + if (property.NameEquals("remoteLoginPortPublicAccess")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + remoteLoginPortPublicAccess = new RemoteLoginPortPublicAccess(property.Value.GetString()); + continue; + } + if (property.NameEquals("allocationState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + allocationState = new AllocationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("allocationStateTransitionTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + allocationStateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("errors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + errors = array; + continue; + } + if (property.NameEquals("currentNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + currentNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + targetNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeStateCounts")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + nodeStateCounts = NodeStateCounts.DeserializeNodeStateCounts(property.Value); + continue; + } + if (property.NameEquals("enableNodePublicIp")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableNodePublicIp = property.Value.GetBoolean(); + continue; + } + } + return new AmlComputeProperties(Optional.ToNullable(osType), vmSize.Value, Optional.ToNullable(vmPriority), virtualMachineImage.Value, Optional.ToNullable(isolatedNetwork), scaleSettings.Value, userAccountCredentials.Value, subnet.Value, Optional.ToNullable(remoteLoginPortPublicAccess), Optional.ToNullable(allocationState), Optional.ToNullable(allocationStateTransitionTime), Optional.ToList(errors), Optional.ToNullable(currentNodeCount), Optional.ToNullable(targetNodeCount), nodeStateCounts.Value, Optional.ToNullable(enableNodePublicIp)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.cs new file mode 100644 index 000000000000..5c46472483cf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlComputeProperties.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// AML Compute properties. + public partial class AmlComputeProperties + { + /// Initializes a new instance of AmlComputeProperties. + public AmlComputeProperties() + { + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of AmlComputeProperties. + /// Compute OS Type. + /// Virtual Machine Size. + /// Virtual Machine priority. + /// Virtual Machine image for AML Compute - windows only. + /// Network is isolated or not. + /// Scale settings for AML Compute. + /// Credentials for an administrator user account that will be created on each compute node. + /// Virtual network subnet resource ID the compute nodes belong to. + /// 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. + /// 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. + /// The time at which the compute entered its current allocation state. + /// Collection of errors encountered by various compute nodes during node setup. + /// The number of compute nodes currently assigned to the compute. + /// 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. + /// Counts of various node states on the compute. + /// 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. + internal AmlComputeProperties(OsType? osType, string vmSize, VmPriority? vmPriority, VirtualMachineImage virtualMachineImage, bool? isolatedNetwork, ScaleSettings scaleSettings, UserAccountCredentials userAccountCredentials, ResourceId subnet, RemoteLoginPortPublicAccess? remoteLoginPortPublicAccess, AllocationState? allocationState, DateTimeOffset? allocationStateTransitionTime, IReadOnlyList errors, int? currentNodeCount, int? targetNodeCount, NodeStateCounts nodeStateCounts, bool? enableNodePublicIp) + { + OsType = osType; + VmSize = vmSize; + VmPriority = vmPriority; + VirtualMachineImage = virtualMachineImage; + IsolatedNetwork = isolatedNetwork; + ScaleSettings = scaleSettings; + UserAccountCredentials = userAccountCredentials; + Subnet = subnet; + RemoteLoginPortPublicAccess = remoteLoginPortPublicAccess; + AllocationState = allocationState; + AllocationStateTransitionTime = allocationStateTransitionTime; + Errors = errors; + CurrentNodeCount = currentNodeCount; + TargetNodeCount = targetNodeCount; + NodeStateCounts = nodeStateCounts; + EnableNodePublicIp = enableNodePublicIp; + } + + /// Compute OS Type. + public OsType? OsType { get; set; } + /// Virtual Machine Size. + public string VmSize { get; set; } + /// Virtual Machine priority. + public VmPriority? VmPriority { get; set; } + /// Virtual Machine image for AML Compute - windows only. + public VirtualMachineImage VirtualMachineImage { get; set; } + /// Network is isolated or not. + public bool? IsolatedNetwork { get; set; } + /// Scale settings for AML Compute. + public ScaleSettings ScaleSettings { get; set; } + /// Credentials for an administrator user account that will be created on each compute node. + public UserAccountCredentials UserAccountCredentials { get; set; } + /// Virtual network subnet resource ID the compute nodes belong to. + public ResourceId Subnet { get; set; } + /// 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. + public RemoteLoginPortPublicAccess? RemoteLoginPortPublicAccess { get; set; } + /// 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. + public AllocationState? AllocationState { get; } + /// The time at which the compute entered its current allocation state. + public DateTimeOffset? AllocationStateTransitionTime { get; } + /// Collection of errors encountered by various compute nodes during node setup. + public IReadOnlyList Errors { get; } + /// The number of compute nodes currently assigned to the compute. + public int? CurrentNodeCount { get; } + /// 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. + public int? TargetNodeCount { get; } + /// Counts of various node states on the compute. + public NodeStateCounts NodeStateCounts { get; } + /// 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. + public bool? EnableNodePublicIp { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlUserFeature.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlUserFeature.Serialization.cs new file mode 100644 index 000000000000..90913bacf642 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlUserFeature.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AmlUserFeature + { + internal static AmlUserFeature DeserializeAmlUserFeature(JsonElement element) + { + Optional id = default; + Optional displayName = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName")) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + } + return new AmlUserFeature(id.Value, displayName.Value, description.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlUserFeature.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlUserFeature.cs new file mode 100644 index 000000000000..09a7be568a90 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AmlUserFeature.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Features enabled for a workspace. + public partial class AmlUserFeature + { + /// Initializes a new instance of AmlUserFeature. + internal AmlUserFeature() + { + } + + /// Initializes a new instance of AmlUserFeature. + /// Specifies the feature ID. + /// Specifies the feature name. + /// Describes the feature for user experience. + internal AmlUserFeature(string id, string displayName, string description) + { + Id = id; + DisplayName = displayName; + Description = description; + } + + /// Specifies the feature ID. + public string Id { get; } + /// Specifies the feature name. + public string DisplayName { get; } + /// Describes the feature for user experience. + public string Description { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ApplicationSharingPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ApplicationSharingPolicy.cs new file mode 100644 index 000000000000..ed43204311ae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ApplicationSharingPolicy.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// 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. + public readonly partial struct ApplicationSharingPolicy : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ApplicationSharingPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PersonalValue = "Personal"; + private const string SharedValue = "Shared"; + + /// Personal. + public static ApplicationSharingPolicy Personal { get; } = new ApplicationSharingPolicy(PersonalValue); + /// Shared. + public static ApplicationSharingPolicy Shared { get; } = new ApplicationSharingPolicy(SharedValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationSharingPolicy left, ApplicationSharingPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationSharingPolicy left, ApplicationSharingPolicy right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApplicationSharingPolicy(string value) => new ApplicationSharingPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationSharingPolicy other && Equals(other); + /// + public bool Equals(ApplicationSharingPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.Serialization.cs new file mode 100644 index 000000000000..9351a47b6518 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AssetPath : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("path"); + writer.WriteStringValue(Path); + if (Optional.IsDefined(IsDirectory)) + { + writer.WritePropertyName("isDirectory"); + writer.WriteBooleanValue(IsDirectory.Value); + } + writer.WriteEndObject(); + } + + internal static AssetPath DeserializeAssetPath(JsonElement element) + { + string path = default; + Optional isDirectory = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path")) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDirectory")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDirectory = property.Value.GetBoolean(); + continue; + } + } + return new AssetPath(path, Optional.ToNullable(isDirectory)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.cs new file mode 100644 index 000000000000..5b5ab849b575 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssetPath.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of an AssetUri. + public partial class AssetPath + { + /// Initializes a new instance of AssetPath. + /// The path of file/directory. + /// is null. + public AssetPath(string path) + { + if (path == null) + { + throw new ArgumentNullException(nameof(path)); + } + + Path = path; + } + + /// Initializes a new instance of AssetPath. + /// The path of file/directory. + /// Whether the path defines a directory or a single file. + internal AssetPath(string path, bool? isDirectory) + { + Path = path; + IsDirectory = isDirectory; + } + + /// The path of file/directory. + public string Path { get; set; } + /// Whether the path defines a directory or a single file. + public bool? IsDirectory { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssignedUser.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssignedUser.Serialization.cs new file mode 100644 index 000000000000..c199c931f488 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssignedUser.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AssignedUser : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("objectId"); + writer.WriteStringValue(ObjectId); + writer.WritePropertyName("tenantId"); + writer.WriteStringValue(TenantId); + writer.WriteEndObject(); + } + + internal static AssignedUser DeserializeAssignedUser(JsonElement element) + { + string objectId = default; + string tenantId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("objectId")) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId")) + { + tenantId = property.Value.GetString(); + continue; + } + } + return new AssignedUser(objectId, tenantId); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssignedUser.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssignedUser.cs new file mode 100644 index 000000000000..136430eadc79 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AssignedUser.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A user that can be assigned to a compute instance. + public partial class AssignedUser + { + /// Initializes a new instance of AssignedUser. + /// User’s AAD Object Id. + /// User’s AAD Tenant Id. + /// or is null. + public AssignedUser(string objectId, string tenantId) + { + if (objectId == null) + { + throw new ArgumentNullException(nameof(objectId)); + } + if (tenantId == null) + { + throw new ArgumentNullException(nameof(tenantId)); + } + + ObjectId = objectId; + TenantId = tenantId; + } + + /// User’s AAD Object Id. + public string ObjectId { get; set; } + /// User’s AAD Tenant Id. + public string TenantId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.Serialization.cs new file mode 100644 index 000000000000..49ada343135b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AuthKeys : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PrimaryKey)) + { + writer.WritePropertyName("primaryKey"); + writer.WriteStringValue(PrimaryKey); + } + if (Optional.IsDefined(SecondaryKey)) + { + writer.WritePropertyName("secondaryKey"); + writer.WriteStringValue(SecondaryKey); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.cs new file mode 100644 index 000000000000..15b49b123b75 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AuthKeys.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The AuthKeys. + public partial class AuthKeys + { + /// Initializes a new instance of AuthKeys. + public AuthKeys() + { + } + + /// The primary key. + public string PrimaryKey { get; set; } + /// The secondary key. + public string SecondaryKey { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.Serialization.cs new file mode 100644 index 000000000000..aee6c096f72b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AutoScaler : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AutoscaleEnabled)) + { + writer.WritePropertyName("autoscaleEnabled"); + writer.WriteBooleanValue(AutoscaleEnabled.Value); + } + if (Optional.IsDefined(MinReplicas)) + { + writer.WritePropertyName("minReplicas"); + writer.WriteNumberValue(MinReplicas.Value); + } + if (Optional.IsDefined(MaxReplicas)) + { + writer.WritePropertyName("maxReplicas"); + writer.WriteNumberValue(MaxReplicas.Value); + } + if (Optional.IsDefined(TargetUtilization)) + { + writer.WritePropertyName("targetUtilization"); + writer.WriteNumberValue(TargetUtilization.Value); + } + if (Optional.IsDefined(RefreshPeriodInSeconds)) + { + writer.WritePropertyName("refreshPeriodInSeconds"); + writer.WriteNumberValue(RefreshPeriodInSeconds.Value); + } + writer.WriteEndObject(); + } + + internal static AutoScaler DeserializeAutoScaler(JsonElement element) + { + Optional autoscaleEnabled = default; + Optional minReplicas = default; + Optional maxReplicas = default; + Optional targetUtilization = default; + Optional refreshPeriodInSeconds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoscaleEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoscaleEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("minReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxReplicas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxReplicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetUtilization")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + targetUtilization = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("refreshPeriodInSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + refreshPeriodInSeconds = property.Value.GetInt32(); + continue; + } + } + return new AutoScaler(Optional.ToNullable(autoscaleEnabled), Optional.ToNullable(minReplicas), Optional.ToNullable(maxReplicas), Optional.ToNullable(targetUtilization), Optional.ToNullable(refreshPeriodInSeconds)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.cs new file mode 100644 index 000000000000..7dc2d956cfbc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AutoScaler.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Auto Scaler properties. + public partial class AutoScaler + { + /// Initializes a new instance of AutoScaler. + public AutoScaler() + { + } + + /// Initializes a new instance of AutoScaler. + /// Option to enable/disable auto scaling. + /// The minimum number of replicas to scale down to. + /// The maximum number of replicas in the cluster. + /// The target utilization percentage to use for determining whether to scale the cluster. + /// The amount of seconds to wait between auto scale updates. + internal AutoScaler(bool? autoscaleEnabled, int? minReplicas, int? maxReplicas, int? targetUtilization, int? refreshPeriodInSeconds) + { + AutoscaleEnabled = autoscaleEnabled; + MinReplicas = minReplicas; + MaxReplicas = maxReplicas; + TargetUtilization = targetUtilization; + RefreshPeriodInSeconds = refreshPeriodInSeconds; + } + + /// Option to enable/disable auto scaling. + public bool? AutoscaleEnabled { get; set; } + /// The minimum number of replicas to scale down to. + public int? MinReplicas { get; set; } + /// The maximum number of replicas in the cluster. + public int? MaxReplicas { get; set; } + /// The target utilization percentage to use for determining whether to scale the cluster. + public int? TargetUtilization { get; set; } + /// The amount of seconds to wait between auto scale updates. + public int? RefreshPeriodInSeconds { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.Serialization.cs new file mode 100644 index 000000000000..a824be707d75 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AzureDataLakeSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("storeName"); + writer.WriteStringValue(StoreName); + writer.WriteEndObject(); + } + + internal static AzureDataLakeSection DeserializeAzureDataLakeSection(JsonElement element) + { + DatastoreCredentials credentials = default; + string storeName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials")) + { + credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("storeName")) + { + storeName = property.Value.GetString(); + continue; + } + } + return new AzureDataLakeSection(credentials, storeName); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.cs new file mode 100644 index 000000000000..ebed5125fb7e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureDataLakeSection.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The AzureDataLakeSection. + public partial class AzureDataLakeSection + { + /// Initializes a new instance of AzureDataLakeSection. + /// . + /// Azure Data Lake store name. + /// or is null. + public AzureDataLakeSection(DatastoreCredentials credentials, string storeName) + { + if (credentials == null) + { + throw new ArgumentNullException(nameof(credentials)); + } + if (storeName == null) + { + throw new ArgumentNullException(nameof(storeName)); + } + + Credentials = credentials; + StoreName = storeName; + } + + public DatastoreCredentials Credentials { get; set; } + /// Azure Data Lake store name. + public string StoreName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.Serialization.cs new file mode 100644 index 000000000000..dcc86047a4e9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AzureMySqlSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("databaseName"); + writer.WriteStringValue(DatabaseName); + writer.WritePropertyName("endpoint"); + writer.WriteStringValue(Endpoint); + writer.WritePropertyName("portNumber"); + writer.WriteNumberValue(PortNumber); + writer.WritePropertyName("serverName"); + writer.WriteStringValue(ServerName); + writer.WriteEndObject(); + } + + internal static AzureMySqlSection DeserializeAzureMySqlSection(JsonElement element) + { + DatastoreCredentials credentials = default; + string databaseName = default; + string endpoint = default; + int portNumber = default; + string serverName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials")) + { + credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("databaseName")) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoint")) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("portNumber")) + { + portNumber = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("serverName")) + { + serverName = property.Value.GetString(); + continue; + } + } + return new AzureMySqlSection(credentials, databaseName, endpoint, portNumber, serverName); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.cs new file mode 100644 index 000000000000..6c52ac4b87c2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureMySqlSection.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The AzureMySqlSection. + public partial class AzureMySqlSection + { + /// Initializes a new instance of AzureMySqlSection. + /// . + /// Azure SQL database name. + /// Azure cloud endpoint for the database. + /// Azure SQL server port. + /// Azure SQL server name. + /// , , , or is null. + public AzureMySqlSection(DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) + { + if (credentials == null) + { + throw new ArgumentNullException(nameof(credentials)); + } + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (serverName == null) + { + throw new ArgumentNullException(nameof(serverName)); + } + + Credentials = credentials; + DatabaseName = databaseName; + Endpoint = endpoint; + PortNumber = portNumber; + ServerName = serverName; + } + + public DatastoreCredentials Credentials { get; set; } + /// Azure SQL database name. + public string DatabaseName { get; set; } + /// Azure cloud endpoint for the database. + public string Endpoint { get; set; } + /// Azure SQL server port. + public int PortNumber { get; set; } + /// Azure SQL server name. + public string ServerName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.Serialization.cs new file mode 100644 index 000000000000..10b42931eaf8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AzurePostgreSqlSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EnableSSL)) + { + writer.WritePropertyName("enableSSL"); + writer.WriteBooleanValue(EnableSSL.Value); + } + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("databaseName"); + writer.WriteStringValue(DatabaseName); + writer.WritePropertyName("endpoint"); + writer.WriteStringValue(Endpoint); + writer.WritePropertyName("portNumber"); + writer.WriteNumberValue(PortNumber); + writer.WritePropertyName("serverName"); + writer.WriteStringValue(ServerName); + writer.WriteEndObject(); + } + + internal static AzurePostgreSqlSection DeserializeAzurePostgreSqlSection(JsonElement element) + { + Optional enableSSL = default; + DatastoreCredentials credentials = default; + string databaseName = default; + string endpoint = default; + int portNumber = default; + string serverName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableSSL")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableSSL = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("credentials")) + { + credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("databaseName")) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoint")) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("portNumber")) + { + portNumber = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("serverName")) + { + serverName = property.Value.GetString(); + continue; + } + } + return new AzurePostgreSqlSection(Optional.ToNullable(enableSSL), credentials, databaseName, endpoint, portNumber, serverName); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.cs new file mode 100644 index 000000000000..878843e6bf01 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzurePostgreSqlSection.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The AzurePostgreSqlSection. + public partial class AzurePostgreSqlSection + { + /// Initializes a new instance of AzurePostgreSqlSection. + /// . + /// Azure SQL database name. + /// Azure cloud endpoint for the database. + /// Azure SQL server port. + /// Azure SQL server name. + /// , , , or is null. + public AzurePostgreSqlSection(DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) + { + if (credentials == null) + { + throw new ArgumentNullException(nameof(credentials)); + } + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (serverName == null) + { + throw new ArgumentNullException(nameof(serverName)); + } + + Credentials = credentials; + DatabaseName = databaseName; + Endpoint = endpoint; + PortNumber = portNumber; + ServerName = serverName; + } + + /// Initializes a new instance of AzurePostgreSqlSection. + /// Whether the Azure PostgreSQL server requires SSL. + /// . + /// Azure SQL database name. + /// Azure cloud endpoint for the database. + /// Azure SQL server port. + /// Azure SQL server name. + internal AzurePostgreSqlSection(bool? enableSSL, DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) + { + EnableSSL = enableSSL; + Credentials = credentials; + DatabaseName = databaseName; + Endpoint = endpoint; + PortNumber = portNumber; + ServerName = serverName; + } + + /// Whether the Azure PostgreSQL server requires SSL. + public bool? EnableSSL { get; set; } + public DatastoreCredentials Credentials { get; set; } + /// Azure SQL database name. + public string DatabaseName { get; set; } + /// Azure cloud endpoint for the database. + public string Endpoint { get; set; } + /// Azure SQL server port. + public int PortNumber { get; set; } + /// Azure SQL server name. + public string ServerName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.Serialization.cs new file mode 100644 index 000000000000..dfc3bde4d648 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AzureSqlDatabaseSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("databaseName"); + writer.WriteStringValue(DatabaseName); + writer.WritePropertyName("endpoint"); + writer.WriteStringValue(Endpoint); + writer.WritePropertyName("portNumber"); + writer.WriteNumberValue(PortNumber); + writer.WritePropertyName("serverName"); + writer.WriteStringValue(ServerName); + writer.WriteEndObject(); + } + + internal static AzureSqlDatabaseSection DeserializeAzureSqlDatabaseSection(JsonElement element) + { + DatastoreCredentials credentials = default; + string databaseName = default; + string endpoint = default; + int portNumber = default; + string serverName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials")) + { + credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("databaseName")) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoint")) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("portNumber")) + { + portNumber = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("serverName")) + { + serverName = property.Value.GetString(); + continue; + } + } + return new AzureSqlDatabaseSection(credentials, databaseName, endpoint, portNumber, serverName); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.cs new file mode 100644 index 000000000000..548c2f335824 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureSqlDatabaseSection.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The AzureSqlDatabaseSection. + public partial class AzureSqlDatabaseSection + { + /// Initializes a new instance of AzureSqlDatabaseSection. + /// . + /// Azure SQL database name. + /// Azure cloud endpoint for the database. + /// Azure SQL server port. + /// Azure SQL server name. + /// , , , or is null. + public AzureSqlDatabaseSection(DatastoreCredentials credentials, string databaseName, string endpoint, int portNumber, string serverName) + { + if (credentials == null) + { + throw new ArgumentNullException(nameof(credentials)); + } + if (databaseName == null) + { + throw new ArgumentNullException(nameof(databaseName)); + } + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (serverName == null) + { + throw new ArgumentNullException(nameof(serverName)); + } + + Credentials = credentials; + DatabaseName = databaseName; + Endpoint = endpoint; + PortNumber = portNumber; + ServerName = serverName; + } + + public DatastoreCredentials Credentials { get; set; } + /// Azure SQL database name. + public string DatabaseName { get; set; } + /// Azure cloud endpoint for the database. + public string Endpoint { get; set; } + /// Azure SQL server port. + public int PortNumber { get; set; } + /// Azure SQL server name. + public string ServerName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.Serialization.cs new file mode 100644 index 000000000000..9829db15547f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class AzureStorageSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("accountName"); + writer.WriteStringValue(AccountName); + if (Optional.IsDefined(BlobCacheTimeout)) + { + writer.WritePropertyName("blobCacheTimeout"); + writer.WriteNumberValue(BlobCacheTimeout.Value); + } + writer.WritePropertyName("containerName"); + writer.WriteStringValue(ContainerName); + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("endpoint"); + writer.WriteStringValue(Endpoint); + writer.WritePropertyName("protocol"); + writer.WriteStringValue(Protocol); + writer.WriteEndObject(); + } + + internal static AzureStorageSection DeserializeAzureStorageSection(JsonElement element) + { + string accountName = default; + Optional blobCacheTimeout = default; + string containerName = default; + DatastoreCredentials credentials = default; + string endpoint = default; + string protocol = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountName")) + { + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("blobCacheTimeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + blobCacheTimeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("containerName")) + { + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("credentials")) + { + credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("endpoint")) + { + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol")) + { + protocol = property.Value.GetString(); + continue; + } + } + return new AzureStorageSection(accountName, Optional.ToNullable(blobCacheTimeout), containerName, credentials, endpoint, protocol); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.cs new file mode 100644 index 000000000000..14a320b584ad --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/AzureStorageSection.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The AzureStorageSection. + public partial class AzureStorageSection + { + /// Initializes a new instance of AzureStorageSection. + /// Storage account name. + /// Storage account container name. + /// . + /// Azure cloud endpoint for the storage account. + /// Protocol used to communicate with the storage account. + /// , , , , or is null. + public AzureStorageSection(string accountName, string containerName, DatastoreCredentials credentials, string endpoint, string protocol) + { + if (accountName == null) + { + throw new ArgumentNullException(nameof(accountName)); + } + if (containerName == null) + { + throw new ArgumentNullException(nameof(containerName)); + } + if (credentials == null) + { + throw new ArgumentNullException(nameof(credentials)); + } + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (protocol == null) + { + throw new ArgumentNullException(nameof(protocol)); + } + + AccountName = accountName; + ContainerName = containerName; + Credentials = credentials; + Endpoint = endpoint; + Protocol = protocol; + } + + /// Initializes a new instance of AzureStorageSection. + /// Storage account name. + /// Blob storage cache timeout. + /// Storage account container name. + /// . + /// Azure cloud endpoint for the storage account. + /// Protocol used to communicate with the storage account. + internal AzureStorageSection(string accountName, int? blobCacheTimeout, string containerName, DatastoreCredentials credentials, string endpoint, string protocol) + { + AccountName = accountName; + BlobCacheTimeout = blobCacheTimeout; + ContainerName = containerName; + Credentials = credentials; + Endpoint = endpoint; + Protocol = protocol; + } + + /// Storage account name. + public string AccountName { get; set; } + /// Blob storage cache timeout. + public int? BlobCacheTimeout { get; set; } + /// Storage account container name. + public string ContainerName { get; set; } + public DatastoreCredentials Credentials { get; set; } + /// Azure cloud endpoint for the storage account. + public string Endpoint { get; set; } + /// Protocol used to communicate with the storage account. + public string Protocol { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/BillingCurrency.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/BillingCurrency.cs new file mode 100644 index 000000000000..cb39b826db8b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/BillingCurrency.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Three lettered code specifying the currency of the VM price. Example: USD. + public readonly partial struct BillingCurrency : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public BillingCurrency(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string USDValue = "USD"; + + /// USD. + public static BillingCurrency USD { get; } = new BillingCurrency(USDValue); + /// Determines if two values are the same. + public static bool operator ==(BillingCurrency left, BillingCurrency right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BillingCurrency left, BillingCurrency right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BillingCurrency(string value) => new BillingCurrency(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BillingCurrency other && Equals(other); + /// + public bool Equals(BillingCurrency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.Serialization.cs new file mode 100644 index 000000000000..7d1662c391f9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.Serialization.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CertificateSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AuthorityUrl)) + { + writer.WritePropertyName("authorityUrl"); + writer.WriteStringValue(AuthorityUrl); + } + if (Optional.IsDefined(ResourceUri)) + { + writer.WritePropertyName("resourceUri"); + writer.WriteStringValue(ResourceUri); + } + writer.WritePropertyName("tenantId"); + writer.WriteStringValue(TenantId); + writer.WritePropertyName("clientId"); + writer.WriteStringValue(ClientId); + if (Optional.IsDefined(Certificate)) + { + writer.WritePropertyName("certificate"); + writer.WriteStringValue(Certificate); + } + writer.WritePropertyName("thumbprint"); + writer.WriteStringValue(Thumbprint); + writer.WriteEndObject(); + } + + internal static CertificateSection DeserializeCertificateSection(JsonElement element) + { + Optional authorityUrl = default; + Optional resourceUri = default; + Guid tenantId = default; + Guid clientId = default; + Optional certificate = default; + string thumbprint = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authorityUrl")) + { + authorityUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceUri")) + { + resourceUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId")) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("clientId")) + { + clientId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("certificate")) + { + certificate = property.Value.GetString(); + continue; + } + if (property.NameEquals("thumbprint")) + { + thumbprint = property.Value.GetString(); + continue; + } + } + return new CertificateSection(authorityUrl.Value, resourceUri.Value, tenantId, clientId, certificate.Value, thumbprint); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.cs new file mode 100644 index 000000000000..0ee1a80b0187 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CertificateSection.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The CertificateSection. + public partial class CertificateSection + { + /// Initializes a new instance of CertificateSection. + /// ID of the tenant to which the service principal belongs. + /// Service principal client ID. + /// Thumbprint of the certificate used for authentication. + /// is null. + public CertificateSection(Guid tenantId, Guid clientId, string thumbprint) + { + if (thumbprint == null) + { + throw new ArgumentNullException(nameof(thumbprint)); + } + + TenantId = tenantId; + ClientId = clientId; + Thumbprint = thumbprint; + } + + /// Initializes a new instance of CertificateSection. + /// Authority URL used for authentication. + /// Resource the service principal has access to. + /// ID of the tenant to which the service principal belongs. + /// Service principal client ID. + /// Service principal certificate. + /// Thumbprint of the certificate used for authentication. + internal CertificateSection(string authorityUrl, string resourceUri, Guid tenantId, Guid clientId, string certificate, string thumbprint) + { + AuthorityUrl = authorityUrl; + ResourceUri = resourceUri; + TenantId = tenantId; + ClientId = clientId; + Certificate = certificate; + Thumbprint = thumbprint; + } + + /// Authority URL used for authentication. + public string AuthorityUrl { get; set; } + /// Resource the service principal has access to. + public string ResourceUri { get; set; } + /// ID of the tenant to which the service principal belongs. + public Guid TenantId { get; set; } + /// Service principal client ID. + public Guid ClientId { get; set; } + /// Service principal certificate. + public string Certificate { get; set; } + /// Thumbprint of the certificate used for authentication. + public string Thumbprint { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.Serialization.cs new file mode 100644 index 000000000000..1d13fa1066f5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ClusterUpdateParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(ScaleSettings)) + { + writer.WritePropertyName("scaleSettings"); + writer.WriteObjectValue(ScaleSettings); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.cs new file mode 100644 index 000000000000..a6bfda5cd853 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ClusterUpdateParameters.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// AmlCompute update parameters. + public partial class ClusterUpdateParameters + { + /// Initializes a new instance of ClusterUpdateParameters. + public ClusterUpdateParameters() + { + } + + /// Desired scale settings for the amlCompute. + public ScaleSettings ScaleSettings { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.Serialization.cs new file mode 100644 index 000000000000..9ad0d259a13f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CodeConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CodeArtifactId)) + { + writer.WritePropertyName("codeArtifactId"); + writer.WriteStringValue(CodeArtifactId); + } + writer.WritePropertyName("command"); + writer.WriteStringValue(Command); + writer.WriteEndObject(); + } + + internal static CodeConfiguration DeserializeCodeConfiguration(JsonElement element) + { + Optional codeArtifactId = default; + string command = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("codeArtifactId")) + { + codeArtifactId = property.Value.GetString(); + continue; + } + if (property.NameEquals("command")) + { + command = property.Value.GetString(); + continue; + } + } + return new CodeConfiguration(codeArtifactId.Value, command); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.cs new file mode 100644 index 000000000000..1bb52e7af5d3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeConfiguration.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The CodeConfiguration. + public partial class CodeConfiguration + { + /// Initializes a new instance of CodeConfiguration. + /// The command to execute on startup of the job. eg. ["python", "train.py"]. + /// is null. + public CodeConfiguration(string command) + { + if (command == null) + { + throw new ArgumentNullException(nameof(command)); + } + + Command = command; + } + + /// Initializes a new instance of CodeConfiguration. + /// The ID of the code asset. + /// The command to execute on startup of the job. eg. ["python", "train.py"]. + internal CodeConfiguration(string codeArtifactId, string command) + { + CodeArtifactId = codeArtifactId; + Command = command; + } + + /// The ID of the code asset. + public string CodeArtifactId { get; set; } + /// The command to execute on startup of the job. eg. ["python", "train.py"]. + public string Command { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.Serialization.cs new file mode 100644 index 000000000000..7127f550c798 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CodeContainer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + } + + internal static CodeContainer DeserializeCodeContainer(JsonElement element) + { + Optional> properties = default; + Optional> tags = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + } + return new CodeContainer(Optional.ToDictionary(properties), Optional.ToDictionary(tags), description.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.cs new file mode 100644 index 000000000000..dff567cdda19 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainer.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The CodeContainer. + public partial class CodeContainer + { + /// Initializes a new instance of CodeContainer. + public CodeContainer() + { + Properties = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of CodeContainer. + /// Dictionary of <string>. + /// Dictionary of <string>. + /// . + internal CodeContainer(IDictionary properties, IDictionary tags, string description) + { + Properties = properties; + Tags = tags; + Description = description; + } + + /// Dictionary of <string>. + public IDictionary Properties { get; } + /// Dictionary of <string>. + public IDictionary Tags { get; } + public string Description { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.Serialization.cs new file mode 100644 index 000000000000..efe4330da3a1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CodeContainerResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static CodeContainerResource DeserializeCodeContainerResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + CodeContainer properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = CodeContainer.DeserializeCodeContainer(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new CodeContainerResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.cs new file mode 100644 index 000000000000..032e5fd54600 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class CodeContainerResource + { + /// Initializes a new instance of CodeContainerResource. + /// . + /// is null. + public CodeContainerResource(CodeContainer properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of CodeContainerResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// . + /// Metadata pertaining to creation and last modification of the resource. + internal CodeContainerResource(string id, string name, string type, CodeContainer properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + public CodeContainer Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..6986359b669f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CodeContainerResourceArmPaginatedResult + { + internal static CodeContainerResourceArmPaginatedResult DeserializeCodeContainerResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CodeContainerResource.DeserializeCodeContainerResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new CodeContainerResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..8d457b3b97bb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of CodeContainer entities. + public partial class CodeContainerResourceArmPaginatedResult + { + /// Initializes a new instance of CodeContainerResourceArmPaginatedResult. + internal CodeContainerResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of CodeContainerResourceArmPaginatedResult. + /// An array of objects of type CodeContainer. + /// . + internal CodeContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type CodeContainer. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.Serialization.cs new file mode 100644 index 000000000000..b3ba4b113f4e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.Serialization.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CodeVersion : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DatastoreId)) + { + writer.WritePropertyName("datastoreId"); + writer.WriteStringValue(DatastoreId); + } + if (Optional.IsDefined(AssetPath)) + { + writer.WritePropertyName("assetPath"); + writer.WriteObjectValue(AssetPath); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static CodeVersion DeserializeCodeVersion(JsonElement element) + { + Optional datastoreId = default; + Optional assetPath = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("datastoreId")) + { + datastoreId = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + assetPath = AssetPath.DeserializeAssetPath(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new CodeVersion(datastoreId.Value, assetPath.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.cs new file mode 100644 index 000000000000..fbe40444e3cd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersion.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of an RegisteredCode. + public partial class CodeVersion + { + /// Initializes a new instance of CodeVersion. + public CodeVersion() + { + Tags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of CodeVersion. + /// The asset datastoreId. + /// Details of an AssetUri. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + internal CodeVersion(string datastoreId, AssetPath assetPath, string description, IDictionary tags, IDictionary properties) + { + DatastoreId = datastoreId; + AssetPath = assetPath; + Description = description; + Tags = tags; + Properties = properties; + } + + /// The asset datastoreId. + public string DatastoreId { get; set; } + /// Details of an AssetUri. + public AssetPath AssetPath { get; set; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + /// The asset property dictionary. + public IDictionary Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.Serialization.cs new file mode 100644 index 000000000000..b7bca4690ad2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CodeVersionResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static CodeVersionResource DeserializeCodeVersionResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + CodeVersion properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = CodeVersion.DeserializeCodeVersion(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new CodeVersionResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.cs new file mode 100644 index 000000000000..bddb1ee47ff0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResource.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class CodeVersionResource + { + /// Initializes a new instance of CodeVersionResource. + /// Details of an RegisteredCode. + /// is null. + public CodeVersionResource(CodeVersion properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of CodeVersionResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// Details of an RegisteredCode. + /// Metadata pertaining to creation and last modification of the resource. + internal CodeVersionResource(string id, string name, string type, CodeVersion properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + /// Details of an RegisteredCode. + public CodeVersion Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..c41c391262d4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CodeVersionResourceArmPaginatedResult + { + internal static CodeVersionResourceArmPaginatedResult DeserializeCodeVersionResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CodeVersionResource.DeserializeCodeVersionResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new CodeVersionResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..6b26c47e290e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of CodeVersion entities. + public partial class CodeVersionResourceArmPaginatedResult + { + /// Initializes a new instance of CodeVersionResourceArmPaginatedResult. + internal CodeVersionResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of CodeVersionResourceArmPaginatedResult. + /// An array of objects of type CodeVersion. + /// . + internal CodeVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type CodeVersion. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.Serialization.cs new file mode 100644 index 000000000000..12784685ac2a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.Serialization.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CommandJob : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(MaxRunDurationSeconds)) + { + writer.WritePropertyName("maxRunDurationSeconds"); + writer.WriteNumberValue(MaxRunDurationSeconds.Value); + } + writer.WritePropertyName("codeConfiguration"); + writer.WriteObjectValue(CodeConfiguration); + if (Optional.IsDefined(EnvironmentId)) + { + writer.WritePropertyName("environmentId"); + writer.WriteStringValue(EnvironmentId); + } + if (Optional.IsCollectionDefined(DataBindings)) + { + writer.WritePropertyName("dataBindings"); + writer.WriteStartObject(); + foreach (var item in DataBindings) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(DistributionConfiguration)) + { + writer.WritePropertyName("distributionConfiguration"); + writer.WriteObjectValue(DistributionConfiguration); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"); + writer.WriteStringValue(ExperimentName); + } + writer.WritePropertyName("computeBinding"); + writer.WriteObjectValue(ComputeBinding); + if (Optional.IsDefined(Output)) + { + writer.WritePropertyName("output"); + writer.WriteObjectValue(Output); + } + writer.WritePropertyName("jobType"); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static CommandJob DeserializeCommandJob(JsonElement element) + { + Optional status = default; + Optional maxRunDurationSeconds = default; + CodeConfiguration codeConfiguration = default; + Optional environmentId = default; + Optional> dataBindings = default; + Optional distributionConfiguration = default; + Optional experimentName = default; + ComputeBinding computeBinding = default; + Optional output = default; + JobType jobType = default; + Optional interactionEndpoints = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("maxRunDurationSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxRunDurationSeconds = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("codeConfiguration")) + { + codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("environmentId")) + { + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBindings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DataBinding.DeserializeDataBinding(property0.Value)); + } + dataBindings = dictionary; + continue; + } + if (property.NameEquals("distributionConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + distributionConfiguration = DistributionConfiguration.DeserializeDistributionConfiguration(property.Value); + continue; + } + if (property.NameEquals("experimentName")) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeBinding")) + { + computeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); + continue; + } + if (property.NameEquals("output")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + output = JobOutput.DeserializeJobOutput(property.Value); + continue; + } + if (property.NameEquals("jobType")) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("interactionEndpoints")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new CommandJob(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties), experimentName.Value, computeBinding, output.Value, Optional.ToNullable(status), Optional.ToNullable(maxRunDurationSeconds), codeConfiguration, environmentId.Value, Optional.ToDictionary(dataBindings), distributionConfiguration.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.cs new file mode 100644 index 000000000000..1ab0c7f0e388 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CommandJob.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Code Job definition. + public partial class CommandJob : ComputeJobBase + { + /// Initializes a new instance of CommandJob. + /// Compute binding definition. + /// . + /// or is null. + public CommandJob(ComputeBinding computeBinding, CodeConfiguration codeConfiguration) : base(computeBinding) + { + if (computeBinding == null) + { + throw new ArgumentNullException(nameof(computeBinding)); + } + if (codeConfiguration == null) + { + throw new ArgumentNullException(nameof(codeConfiguration)); + } + + CodeConfiguration = codeConfiguration; + DataBindings = new ChangeTrackingDictionary(); + JobType = JobType.Command; + } + + /// Initializes a new instance of CommandJob. + /// Specifies the type of job. + /// + /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. + /// + /// For local jobs, a job endpoint will have a value of FileStreamObject. + /// + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Compute binding definition. + /// . + /// Status of the job. + /// The max run duration in seconds, after which the job will be cancelled. + /// . + /// Environment specification of the job. + /// Mapping of data bindings used in the job. + /// . + internal CommandJob(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties, string experimentName, ComputeBinding computeBinding, JobOutput output, JobStatus? status, long? maxRunDurationSeconds, CodeConfiguration codeConfiguration, string environmentId, IDictionary dataBindings, DistributionConfiguration distributionConfiguration) : base(jobType, interactionEndpoints, description, tags, properties, experimentName, computeBinding, output) + { + Status = status; + MaxRunDurationSeconds = maxRunDurationSeconds; + CodeConfiguration = codeConfiguration; + EnvironmentId = environmentId; + DataBindings = dataBindings; + DistributionConfiguration = distributionConfiguration; + JobType = jobType; + } + + /// Status of the job. + public JobStatus? Status { get; set; } + /// The max run duration in seconds, after which the job will be cancelled. + public long? MaxRunDurationSeconds { get; set; } + public CodeConfiguration CodeConfiguration { get; set; } + /// Environment specification of the job. + public string EnvironmentId { get; set; } + /// Mapping of data bindings used in the job. + public IDictionary DataBindings { get; } + public DistributionConfiguration DistributionConfiguration { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.Serialization.cs new file mode 100644 index 000000000000..2cc3d7ecfeeb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Compute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static Compute DeserializeCompute(JsonElement element) + { + if (element.TryGetProperty("computeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AKS": return AKS.DeserializeAKS(element); + case "AmlCompute": return AmlCompute.DeserializeAmlCompute(element); + case "ComputeInstance": return ComputeInstance.DeserializeComputeInstance(element); + case "DataFactory": return DataFactory.DeserializeDataFactory(element); + case "DataLakeAnalytics": return DataLakeAnalytics.DeserializeDataLakeAnalytics(element); + case "Databricks": return Databricks.DeserializeDatabricks(element); + case "HDInsight": return HDInsight.DeserializeHDInsight(element); + case "VirtualMachine": return VirtualMachine.DeserializeVirtualMachine(element); + } + } + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new Compute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.cs new file mode 100644 index 000000000000..5563c78fd41c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Compute.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Machine Learning compute object. + public partial class Compute + { + /// Initializes a new instance of Compute. + public Compute() + { + ProvisioningErrors = new ChangeTrackingList(); + } + + /// Initializes a new instance of Compute. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + internal Compute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute) + { + ComputeType = computeType; + ComputeLocation = computeLocation; + ProvisioningState = provisioningState; + Description = description; + CreatedOn = createdOn; + ModifiedOn = modifiedOn; + ResourceId = resourceId; + ProvisioningErrors = provisioningErrors; + IsAttachedCompute = isAttachedCompute; + } + + /// The type of compute. + internal ComputeType ComputeType { get; set; } + /// Location for the underlying compute. + public string ComputeLocation { get; set; } + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + public ProvisioningState? ProvisioningState { get; } + /// The description of the Machine Learning compute. + public string Description { get; set; } + /// The date and time when the compute was created. + public DateTimeOffset? CreatedOn { get; } + /// The date and time when the compute was last modified. + public DateTimeOffset? ModifiedOn { get; } + /// ARM resource id of the underlying compute. + public string ResourceId { get; set; } + /// Errors during provisioning. + public IReadOnlyList ProvisioningErrors { get; } + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + public bool? IsAttachedCompute { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.Serialization.cs new file mode 100644 index 000000000000..0ce0f1cf173e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeBinding : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ComputeId)) + { + writer.WritePropertyName("computeId"); + writer.WriteStringValue(ComputeId); + } + if (Optional.IsDefined(NodeCount)) + { + writer.WritePropertyName("nodeCount"); + writer.WriteNumberValue(NodeCount.Value); + } + if (Optional.IsDefined(IsLocal)) + { + writer.WritePropertyName("isLocal"); + writer.WriteBooleanValue(IsLocal.Value); + } + writer.WriteEndObject(); + } + + internal static ComputeBinding DeserializeComputeBinding(JsonElement element) + { + Optional computeId = default; + Optional nodeCount = default; + Optional isLocal = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeId")) + { + computeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + nodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isLocal")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isLocal = property.Value.GetBoolean(); + continue; + } + } + return new ComputeBinding(computeId.Value, Optional.ToNullable(nodeCount), Optional.ToNullable(isLocal)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.cs new file mode 100644 index 000000000000..384d1e7f69c3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeBinding.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Compute binding definition. + public partial class ComputeBinding + { + /// Initializes a new instance of ComputeBinding. + public ComputeBinding() + { + } + + /// Initializes a new instance of ComputeBinding. + /// Resource ID of the compute resource. + /// Number of nodes. + /// Set to true for jobs running on local compute. + internal ComputeBinding(string computeId, int? nodeCount, bool? isLocal) + { + ComputeId = computeId; + NodeCount = nodeCount; + IsLocal = isLocal; + } + + /// Resource ID of the compute resource. + public string ComputeId { get; set; } + /// Number of nodes. + public int? NodeCount { get; set; } + /// Set to true for jobs running on local compute. + public bool? IsLocal { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeEnvironmentType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeEnvironmentType.cs new file mode 100644 index 000000000000..4d3df69e1cb8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeEnvironmentType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The compute environment type for the service. + public readonly partial struct ComputeEnvironmentType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ComputeEnvironmentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ACIValue = "ACI"; + private const string AKSValue = "AKS"; + + /// ACI. + public static ComputeEnvironmentType ACI { get; } = new ComputeEnvironmentType(ACIValue); + /// AKS. + public static ComputeEnvironmentType AKS { get; } = new ComputeEnvironmentType(AKSValue); + /// Determines if two values are the same. + public static bool operator ==(ComputeEnvironmentType left, ComputeEnvironmentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComputeEnvironmentType left, ComputeEnvironmentType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ComputeEnvironmentType(string value) => new ComputeEnvironmentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComputeEnvironmentType other && Equals(other); + /// + public bool Equals(ComputeEnvironmentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.Serialization.cs new file mode 100644 index 000000000000..f6877c450bf6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeInstance : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static ComputeInstance DeserializeComputeInstance(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ComputeInstanceProperties.DeserializeComputeInstanceProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new ComputeInstance(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.cs new file mode 100644 index 000000000000..75b4964509c2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstance.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// An Azure Machine Learning compute instance. + public partial class ComputeInstance : Compute + { + /// Initializes a new instance of ComputeInstance. + public ComputeInstance() + { + ComputeType = ComputeType.ComputeInstance; + } + + /// Initializes a new instance of ComputeInstance. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Compute Instance properties. + internal ComputeInstance(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, ComputeInstanceProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + { + Properties = properties; + ComputeType = computeType; + } + + /// Compute Instance properties. + public ComputeInstanceProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceApplication.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceApplication.Serialization.cs new file mode 100644 index 000000000000..fc8437a3cb76 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceApplication.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeInstanceApplication + { + internal static ComputeInstanceApplication DeserializeComputeInstanceApplication(JsonElement element) + { + Optional displayName = default; + Optional endpointUri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName")) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointUri")) + { + endpointUri = property.Value.GetString(); + continue; + } + } + return new ComputeInstanceApplication(displayName.Value, endpointUri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceApplication.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceApplication.cs new file mode 100644 index 000000000000..a284c28f9732 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceApplication.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Defines an Aml Instance application and its connectivity endpoint URI. + public partial class ComputeInstanceApplication + { + /// Initializes a new instance of ComputeInstanceApplication. + internal ComputeInstanceApplication() + { + } + + /// Initializes a new instance of ComputeInstanceApplication. + /// Name of the ComputeInstance application. + /// Application' endpoint URI. + internal ComputeInstanceApplication(string displayName, string endpointUri) + { + DisplayName = displayName; + EndpointUri = endpointUri; + } + + /// Name of the ComputeInstance application. + public string DisplayName { get; } + /// Application' endpoint URI. + public string EndpointUri { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceAuthorizationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceAuthorizationType.cs new file mode 100644 index 000000000000..909ef7813e6b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceAuthorizationType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Compute Instance Authorization type. Available values are personal (default). + public readonly partial struct ComputeInstanceAuthorizationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ComputeInstanceAuthorizationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PersonalValue = "personal"; + + /// personal. + public static ComputeInstanceAuthorizationType Personal { get; } = new ComputeInstanceAuthorizationType(PersonalValue); + /// Determines if two values are the same. + public static bool operator ==(ComputeInstanceAuthorizationType left, ComputeInstanceAuthorizationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComputeInstanceAuthorizationType left, ComputeInstanceAuthorizationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ComputeInstanceAuthorizationType(string value) => new ComputeInstanceAuthorizationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComputeInstanceAuthorizationType other && Equals(other); + /// + public bool Equals(ComputeInstanceAuthorizationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceConnectivityEndpoints.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceConnectivityEndpoints.Serialization.cs new file mode 100644 index 000000000000..ce84d09f4799 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceConnectivityEndpoints.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeInstanceConnectivityEndpoints + { + internal static ComputeInstanceConnectivityEndpoints DeserializeComputeInstanceConnectivityEndpoints(JsonElement element) + { + Optional publicIpAddress = default; + Optional privateIpAddress = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicIpAddress")) + { + publicIpAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateIpAddress")) + { + privateIpAddress = property.Value.GetString(); + continue; + } + } + return new ComputeInstanceConnectivityEndpoints(publicIpAddress.Value, privateIpAddress.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceConnectivityEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceConnectivityEndpoints.cs new file mode 100644 index 000000000000..cf6fd4d76423 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceConnectivityEndpoints.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Defines all connectivity endpoints and properties for an ComputeInstance. + public partial class ComputeInstanceConnectivityEndpoints + { + /// Initializes a new instance of ComputeInstanceConnectivityEndpoints. + internal ComputeInstanceConnectivityEndpoints() + { + } + + /// Initializes a new instance of ComputeInstanceConnectivityEndpoints. + /// Public IP Address of this ComputeInstance. + /// Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). + internal ComputeInstanceConnectivityEndpoints(string publicIpAddress, string privateIpAddress) + { + PublicIpAddress = publicIpAddress; + PrivateIpAddress = privateIpAddress; + } + + /// Public IP Address of this ComputeInstance. + public string PublicIpAddress { get; } + /// Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). + public string PrivateIpAddress { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceCreatedBy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceCreatedBy.Serialization.cs new file mode 100644 index 000000000000..093643fda80c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceCreatedBy.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeInstanceCreatedBy + { + internal static ComputeInstanceCreatedBy DeserializeComputeInstanceCreatedBy(JsonElement element) + { + Optional userName = default; + Optional userOrgId = default; + Optional userId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userName")) + { + userName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userOrgId")) + { + userOrgId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userId")) + { + userId = property.Value.GetString(); + continue; + } + } + return new ComputeInstanceCreatedBy(userName.Value, userOrgId.Value, userId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceCreatedBy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceCreatedBy.cs new file mode 100644 index 000000000000..bfdb872df455 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceCreatedBy.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Describes information on user who created this ComputeInstance. + public partial class ComputeInstanceCreatedBy + { + /// Initializes a new instance of ComputeInstanceCreatedBy. + internal ComputeInstanceCreatedBy() + { + } + + /// Initializes a new instance of ComputeInstanceCreatedBy. + /// Name of the user. + /// Uniquely identifies user' Azure Active Directory organization. + /// Uniquely identifies the user within his/her organization. + internal ComputeInstanceCreatedBy(string userName, string userOrgId, string userId) + { + UserName = userName; + UserOrgId = userOrgId; + UserId = userId; + } + + /// Name of the user. + public string UserName { get; } + /// Uniquely identifies user' Azure Active Directory organization. + public string UserOrgId { get; } + /// Uniquely identifies the user within his/her organization. + public string UserId { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceLastOperation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceLastOperation.Serialization.cs new file mode 100644 index 000000000000..889b11d26e30 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceLastOperation.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeInstanceLastOperation + { + internal static ComputeInstanceLastOperation DeserializeComputeInstanceLastOperation(JsonElement element) + { + Optional operationName = default; + Optional operationTime = default; + Optional operationStatus = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + operationName = new OperationName(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + operationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("operationStatus")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + operationStatus = new OperationStatus(property.Value.GetString()); + continue; + } + } + return new ComputeInstanceLastOperation(Optional.ToNullable(operationName), Optional.ToNullable(operationTime), Optional.ToNullable(operationStatus)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceLastOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceLastOperation.cs new file mode 100644 index 000000000000..e1a01eee96c7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceLastOperation.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The last operation on ComputeInstance. + public partial class ComputeInstanceLastOperation + { + /// Initializes a new instance of ComputeInstanceLastOperation. + internal ComputeInstanceLastOperation() + { + } + + /// Initializes a new instance of ComputeInstanceLastOperation. + /// Name of the last operation. + /// Time of the last operation. + /// Operation status. + internal ComputeInstanceLastOperation(OperationName? operationName, DateTimeOffset? operationTime, OperationStatus? operationStatus) + { + OperationName = operationName; + OperationTime = operationTime; + OperationStatus = operationStatus; + } + + /// Name of the last operation. + public OperationName? OperationName { get; } + /// Time of the last operation. + public DateTimeOffset? OperationTime { get; } + /// Operation status. + public OperationStatus? OperationStatus { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..1a4acf48302d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeInstanceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VmSize)) + { + writer.WritePropertyName("vmSize"); + writer.WriteStringValue(VmSize); + } + if (Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"); + writer.WriteObjectValue(Subnet); + } + if (Optional.IsDefined(ApplicationSharingPolicy)) + { + writer.WritePropertyName("applicationSharingPolicy"); + writer.WriteStringValue(ApplicationSharingPolicy.Value.ToString()); + } + if (Optional.IsDefined(SshSettings)) + { + writer.WritePropertyName("sshSettings"); + writer.WriteObjectValue(SshSettings); + } + if (Optional.IsDefined(ComputeInstanceAuthorizationType)) + { + writer.WritePropertyName("computeInstanceAuthorizationType"); + writer.WriteStringValue(ComputeInstanceAuthorizationType.Value.ToString()); + } + if (Optional.IsDefined(PersonalComputeInstanceSettings)) + { + writer.WritePropertyName("personalComputeInstanceSettings"); + writer.WriteObjectValue(PersonalComputeInstanceSettings); + } + writer.WriteEndObject(); + } + + internal static ComputeInstanceProperties DeserializeComputeInstanceProperties(JsonElement element) + { + Optional vmSize = default; + Optional subnet = default; + Optional applicationSharingPolicy = default; + Optional sshSettings = default; + Optional connectivityEndpoints = default; + Optional> applications = default; + Optional createdBy = default; + Optional> errors = default; + Optional state = default; + Optional computeInstanceAuthorizationType = default; + Optional personalComputeInstanceSettings = default; + Optional lastOperation = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSize")) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + subnet = ResourceId.DeserializeResourceId(property.Value); + continue; + } + if (property.NameEquals("applicationSharingPolicy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + applicationSharingPolicy = new ApplicationSharingPolicy(property.Value.GetString()); + continue; + } + if (property.NameEquals("sshSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshSettings = ComputeInstanceSshSettings.DeserializeComputeInstanceSshSettings(property.Value); + continue; + } + if (property.NameEquals("connectivityEndpoints")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + connectivityEndpoints = ComputeInstanceConnectivityEndpoints.DeserializeComputeInstanceConnectivityEndpoints(property.Value); + continue; + } + if (property.NameEquals("applications")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ComputeInstanceApplication.DeserializeComputeInstanceApplication(item)); + } + applications = array; + continue; + } + if (property.NameEquals("createdBy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdBy = ComputeInstanceCreatedBy.DeserializeComputeInstanceCreatedBy(property.Value); + continue; + } + if (property.NameEquals("errors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + errors = array; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new ComputeInstanceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeInstanceAuthorizationType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + computeInstanceAuthorizationType = new ComputeInstanceAuthorizationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("personalComputeInstanceSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + personalComputeInstanceSettings = PersonalComputeInstanceSettings.DeserializePersonalComputeInstanceSettings(property.Value); + continue; + } + if (property.NameEquals("lastOperation")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + lastOperation = ComputeInstanceLastOperation.DeserializeComputeInstanceLastOperation(property.Value); + continue; + } + } + return new ComputeInstanceProperties(vmSize.Value, subnet.Value, Optional.ToNullable(applicationSharingPolicy), sshSettings.Value, connectivityEndpoints.Value, Optional.ToList(applications), createdBy.Value, Optional.ToList(errors), Optional.ToNullable(state), Optional.ToNullable(computeInstanceAuthorizationType), personalComputeInstanceSettings.Value, lastOperation.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.cs new file mode 100644 index 000000000000..5d6b4b36f54c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Compute Instance properties. + public partial class ComputeInstanceProperties + { + /// Initializes a new instance of ComputeInstanceProperties. + public ComputeInstanceProperties() + { + Applications = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of ComputeInstanceProperties. + /// Virtual Machine Size. + /// Virtual network subnet resource ID the compute nodes belong to. + /// 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. + /// Specifies policy and settings for SSH access. + /// Describes all connectivity endpoints available for this ComputeInstance. + /// Describes available applications and their endpoints on this ComputeInstance. + /// Describes information on user who created this ComputeInstance. + /// Collection of errors encountered on this ComputeInstance. + /// The current state of this ComputeInstance. + /// The Compute Instance Authorization type. Available values are personal (default). + /// Settings for a personal compute instance. + /// The last operation on ComputeInstance. + internal ComputeInstanceProperties(string vmSize, ResourceId subnet, ApplicationSharingPolicy? applicationSharingPolicy, ComputeInstanceSshSettings sshSettings, ComputeInstanceConnectivityEndpoints connectivityEndpoints, IReadOnlyList applications, ComputeInstanceCreatedBy createdBy, IReadOnlyList errors, ComputeInstanceState? state, ComputeInstanceAuthorizationType? computeInstanceAuthorizationType, PersonalComputeInstanceSettings personalComputeInstanceSettings, ComputeInstanceLastOperation lastOperation) + { + VmSize = vmSize; + Subnet = subnet; + ApplicationSharingPolicy = applicationSharingPolicy; + SshSettings = sshSettings; + ConnectivityEndpoints = connectivityEndpoints; + Applications = applications; + CreatedBy = createdBy; + Errors = errors; + State = state; + ComputeInstanceAuthorizationType = computeInstanceAuthorizationType; + PersonalComputeInstanceSettings = personalComputeInstanceSettings; + LastOperation = lastOperation; + } + + /// Virtual Machine Size. + public string VmSize { get; set; } + /// Virtual network subnet resource ID the compute nodes belong to. + public ResourceId Subnet { get; set; } + /// 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. + public ApplicationSharingPolicy? ApplicationSharingPolicy { get; set; } + /// Specifies policy and settings for SSH access. + public ComputeInstanceSshSettings SshSettings { get; set; } + /// Describes all connectivity endpoints available for this ComputeInstance. + public ComputeInstanceConnectivityEndpoints ConnectivityEndpoints { get; } + /// Describes available applications and their endpoints on this ComputeInstance. + public IReadOnlyList Applications { get; } + /// Describes information on user who created this ComputeInstance. + public ComputeInstanceCreatedBy CreatedBy { get; } + /// Collection of errors encountered on this ComputeInstance. + public IReadOnlyList Errors { get; } + /// The current state of this ComputeInstance. + public ComputeInstanceState? State { get; } + /// The Compute Instance Authorization type. Available values are personal (default). + public ComputeInstanceAuthorizationType? ComputeInstanceAuthorizationType { get; set; } + /// Settings for a personal compute instance. + public PersonalComputeInstanceSettings PersonalComputeInstanceSettings { get; set; } + /// The last operation on ComputeInstance. + public ComputeInstanceLastOperation LastOperation { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceSshSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceSshSettings.Serialization.cs new file mode 100644 index 000000000000..402e645e3c87 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceSshSettings.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeInstanceSshSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SshPublicAccess)) + { + writer.WritePropertyName("sshPublicAccess"); + writer.WriteStringValue(SshPublicAccess.Value.ToString()); + } + if (Optional.IsDefined(AdminPublicKey)) + { + writer.WritePropertyName("adminPublicKey"); + writer.WriteStringValue(AdminPublicKey); + } + writer.WriteEndObject(); + } + + internal static ComputeInstanceSshSettings DeserializeComputeInstanceSshSettings(JsonElement element) + { + Optional sshPublicAccess = default; + Optional adminUserName = default; + Optional sshPort = default; + Optional adminPublicKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sshPublicAccess")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshPublicAccess = new SshPublicAccess(property.Value.GetString()); + continue; + } + if (property.NameEquals("adminUserName")) + { + adminUserName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPort")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("adminPublicKey")) + { + adminPublicKey = property.Value.GetString(); + continue; + } + } + return new ComputeInstanceSshSettings(Optional.ToNullable(sshPublicAccess), adminUserName.Value, Optional.ToNullable(sshPort), adminPublicKey.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceSshSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceSshSettings.cs new file mode 100644 index 000000000000..a7105508d539 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceSshSettings.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Specifies policy and settings for SSH access. + public partial class ComputeInstanceSshSettings + { + /// Initializes a new instance of ComputeInstanceSshSettings. + public ComputeInstanceSshSettings() + { + } + + /// Initializes a new instance of ComputeInstanceSshSettings. + /// 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. + /// Describes the admin user name. + /// Describes the port for connecting through SSH. + /// Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. + internal ComputeInstanceSshSettings(SshPublicAccess? sshPublicAccess, string adminUserName, int? sshPort, string adminPublicKey) + { + SshPublicAccess = sshPublicAccess; + AdminUserName = adminUserName; + SshPort = sshPort; + AdminPublicKey = adminPublicKey; + } + + /// 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. + public SshPublicAccess? SshPublicAccess { get; set; } + /// Describes the admin user name. + public string AdminUserName { get; } + /// Describes the port for connecting through SSH. + public int? SshPort { get; } + /// Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. + public string AdminPublicKey { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceState.cs new file mode 100644 index 000000000000..8dbfd34e5134 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeInstanceState.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Current state of an ComputeInstance. + public readonly partial struct ComputeInstanceState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ComputeInstanceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string CreateFailedValue = "CreateFailed"; + private const string DeletingValue = "Deleting"; + private const string RunningValue = "Running"; + private const string RestartingValue = "Restarting"; + private const string JobRunningValue = "JobRunning"; + private const string SettingUpValue = "SettingUp"; + private const string SetupFailedValue = "SetupFailed"; + private const string StartingValue = "Starting"; + private const string StoppedValue = "Stopped"; + private const string StoppingValue = "Stopping"; + private const string UserSettingUpValue = "UserSettingUp"; + private const string UserSetupFailedValue = "UserSetupFailed"; + private const string UnknownValue = "Unknown"; + private const string UnusableValue = "Unusable"; + + /// Creating. + public static ComputeInstanceState Creating { get; } = new ComputeInstanceState(CreatingValue); + /// CreateFailed. + public static ComputeInstanceState CreateFailed { get; } = new ComputeInstanceState(CreateFailedValue); + /// Deleting. + public static ComputeInstanceState Deleting { get; } = new ComputeInstanceState(DeletingValue); + /// Running. + public static ComputeInstanceState Running { get; } = new ComputeInstanceState(RunningValue); + /// Restarting. + public static ComputeInstanceState Restarting { get; } = new ComputeInstanceState(RestartingValue); + /// JobRunning. + public static ComputeInstanceState JobRunning { get; } = new ComputeInstanceState(JobRunningValue); + /// SettingUp. + public static ComputeInstanceState SettingUp { get; } = new ComputeInstanceState(SettingUpValue); + /// SetupFailed. + public static ComputeInstanceState SetupFailed { get; } = new ComputeInstanceState(SetupFailedValue); + /// Starting. + public static ComputeInstanceState Starting { get; } = new ComputeInstanceState(StartingValue); + /// Stopped. + public static ComputeInstanceState Stopped { get; } = new ComputeInstanceState(StoppedValue); + /// Stopping. + public static ComputeInstanceState Stopping { get; } = new ComputeInstanceState(StoppingValue); + /// UserSettingUp. + public static ComputeInstanceState UserSettingUp { get; } = new ComputeInstanceState(UserSettingUpValue); + /// UserSetupFailed. + public static ComputeInstanceState UserSetupFailed { get; } = new ComputeInstanceState(UserSetupFailedValue); + /// Unknown. + public static ComputeInstanceState Unknown { get; } = new ComputeInstanceState(UnknownValue); + /// Unusable. + public static ComputeInstanceState Unusable { get; } = new ComputeInstanceState(UnusableValue); + /// Determines if two values are the same. + public static bool operator ==(ComputeInstanceState left, ComputeInstanceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComputeInstanceState left, ComputeInstanceState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ComputeInstanceState(string value) => new ComputeInstanceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComputeInstanceState other && Equals(other); + /// + public bool Equals(ComputeInstanceState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.Serialization.cs new file mode 100644 index 000000000000..794de254874e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeJobBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"); + writer.WriteStringValue(ExperimentName); + } + writer.WritePropertyName("computeBinding"); + writer.WriteObjectValue(ComputeBinding); + if (Optional.IsDefined(Output)) + { + writer.WritePropertyName("output"); + writer.WriteObjectValue(Output); + } + writer.WritePropertyName("jobType"); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static ComputeJobBase DeserializeComputeJobBase(JsonElement element) + { + if (element.TryGetProperty("jobType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Command": return CommandJob.DeserializeCommandJob(element); + case "Sweep": return SweepJob.DeserializeSweepJob(element); + } + } + Optional experimentName = default; + ComputeBinding computeBinding = default; + Optional output = default; + JobType jobType = default; + Optional interactionEndpoints = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("experimentName")) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeBinding")) + { + computeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); + continue; + } + if (property.NameEquals("output")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + output = JobOutput.DeserializeJobOutput(property.Value); + continue; + } + if (property.NameEquals("jobType")) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("interactionEndpoints")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new ComputeJobBase(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties), experimentName.Value, computeBinding, output.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.cs new file mode 100644 index 000000000000..abe12c0e119e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeJobBase.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Compute job base definition. + public partial class ComputeJobBase : JobBase + { + /// Initializes a new instance of ComputeJobBase. + /// Compute binding definition. + /// is null. + public ComputeJobBase(ComputeBinding computeBinding) + { + if (computeBinding == null) + { + throw new ArgumentNullException(nameof(computeBinding)); + } + + ComputeBinding = computeBinding; + JobType = new JobType("ComputeJobBase"); + } + + /// Initializes a new instance of ComputeJobBase. + /// Specifies the type of job. + /// + /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. + /// + /// For local jobs, a job endpoint will have a value of FileStreamObject. + /// + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Compute binding definition. + /// . + internal ComputeJobBase(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties, string experimentName, ComputeBinding computeBinding, JobOutput output) : base(jobType, interactionEndpoints, description, tags, properties) + { + ExperimentName = experimentName; + ComputeBinding = computeBinding; + Output = output; + JobType = jobType; + } + + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + public string ExperimentName { get; set; } + /// Compute binding definition. + public ComputeBinding ComputeBinding { get; set; } + public JobOutput Output { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.Serialization.cs new file mode 100644 index 000000000000..73a6a0529a49 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.Serialization.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeNodesInformation + { + internal static ComputeNodesInformation DeserializeComputeNodesInformation(JsonElement element) + { + if (element.TryGetProperty("computeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AmlCompute": return AmlComputeNodesInformation.DeserializeAmlComputeNodesInformation(element); + } + } + ComputeType computeType = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ComputeNodesInformation(computeType, nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.cs new file mode 100644 index 000000000000..d8792966e3c0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeNodesInformation.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Compute nodes information related to a Machine Learning compute. Might differ for every type of compute. + public partial class ComputeNodesInformation + { + /// Initializes a new instance of ComputeNodesInformation. + internal ComputeNodesInformation() + { + } + + /// Initializes a new instance of ComputeNodesInformation. + /// The type of compute. + /// The continuation token. + internal ComputeNodesInformation(ComputeType computeType, string nextLink) + { + ComputeType = computeType; + NextLink = nextLink; + } + + /// The type of compute. + internal ComputeType ComputeType { get; set; } + /// The continuation token. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.Serialization.cs new file mode 100644 index 000000000000..dd7d1ecef035 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static ComputeResource DeserializeComputeResource(JsonElement element) + { + Optional properties = default; + Optional id = default; + Optional name = default; + Optional identity = default; + Optional location = default; + Optional type = default; + Optional> tags = default; + Optional sku = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = Compute.DeserializeCompute(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = Identity.DeserializeIdentity(property.Value); + continue; + } + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = Sku.DeserializeSku(property.Value); + continue; + } + } + return new ComputeResource(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.cs new file mode 100644 index 000000000000..65c9430a50d1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeResource.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Machine Learning compute object wrapped into ARM resource envelope. + public partial class ComputeResource : Resource + { + /// Initializes a new instance of ComputeResource. + public ComputeResource() + { + } + + /// Initializes a new instance of ComputeResource. + /// Specifies the resource ID. + /// Specifies the name of the resource. + /// The identity of the resource. + /// Specifies the location of the resource. + /// Specifies the type of the resource. + /// Contains resource tags defined as key/value pairs. + /// The sku of the workspace. + /// Compute properties. + internal ComputeResource(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, Compute properties) : base(id, name, identity, location, type, tags, sku) + { + Properties = properties; + } + + /// Compute properties. + public Compute Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeSecrets.Serialization.cs new file mode 100644 index 000000000000..45224faf8783 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeSecrets.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ComputeSecrets + { + internal static ComputeSecrets DeserializeComputeSecrets(JsonElement element) + { + if (element.TryGetProperty("computeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AKS": return AksComputeSecrets.DeserializeAksComputeSecrets(element); + case "Databricks": return DatabricksComputeSecrets.DeserializeDatabricksComputeSecrets(element); + case "VirtualMachine": return VirtualMachineSecrets.DeserializeVirtualMachineSecrets(element); + } + } + ComputeType computeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + } + return new ComputeSecrets(computeType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeSecrets.cs new file mode 100644 index 000000000000..be15b22eacf6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeSecrets.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Secrets related to a Machine Learning compute. Might differ for every type of compute. + public partial class ComputeSecrets + { + /// Initializes a new instance of ComputeSecrets. + internal ComputeSecrets() + { + } + + /// Initializes a new instance of ComputeSecrets. + /// The type of compute. + internal ComputeSecrets(ComputeType computeType) + { + ComputeType = computeType; + } + + /// The type of compute. + internal ComputeType ComputeType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeType.cs new file mode 100644 index 000000000000..536a007a707d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ComputeType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The type of compute. + public readonly partial struct ComputeType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ComputeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AKSValue = "AKS"; + private const string AmlComputeValue = "AmlCompute"; + private const string ComputeInstanceValue = "ComputeInstance"; + private const string DataFactoryValue = "DataFactory"; + private const string VirtualMachineValue = "VirtualMachine"; + private const string HDInsightValue = "HDInsight"; + private const string DatabricksValue = "Databricks"; + private const string DataLakeAnalyticsValue = "DataLakeAnalytics"; + + /// AKS. + public static ComputeType AKS { get; } = new ComputeType(AKSValue); + /// AmlCompute. + public static ComputeType AmlCompute { get; } = new ComputeType(AmlComputeValue); + /// ComputeInstance. + public static ComputeType ComputeInstance { get; } = new ComputeType(ComputeInstanceValue); + /// DataFactory. + public static ComputeType DataFactory { get; } = new ComputeType(DataFactoryValue); + /// VirtualMachine. + public static ComputeType VirtualMachine { get; } = new ComputeType(VirtualMachineValue); + /// HDInsight. + public static ComputeType HDInsight { get; } = new ComputeType(HDInsightValue); + /// Databricks. + public static ComputeType Databricks { get; } = new ComputeType(DatabricksValue); + /// DataLakeAnalytics. + public static ComputeType DataLakeAnalytics { get; } = new ComputeType(DataLakeAnalyticsValue); + /// Determines if two values are the same. + public static bool operator ==(ComputeType left, ComputeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComputeType left, ComputeType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ComputeType(string value) => new ComputeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComputeType other && Equals(other); + /// + public bool Equals(ComputeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.Serialization.cs new file mode 100644 index 000000000000..e41dcc54c67b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ContainerRegistry : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"); + writer.WriteStringValue(Address); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.cs new file mode 100644 index 000000000000..1948f5487a15 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistry.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ContainerRegistry. + public partial class ContainerRegistry + { + /// Initializes a new instance of ContainerRegistry. + public ContainerRegistry() + { + } + + public string Address { get; set; } + public string Username { get; set; } + public string Password { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.Serialization.cs new file mode 100644 index 000000000000..531df16af65f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ContainerRegistryResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"); + writer.WriteStringValue(Address); + } + writer.WriteEndObject(); + } + + internal static ContainerRegistryResponse DeserializeContainerRegistryResponse(JsonElement element) + { + Optional address = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("address")) + { + address = property.Value.GetString(); + continue; + } + } + return new ContainerRegistryResponse(address.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.cs new file mode 100644 index 000000000000..1df496d49723 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerRegistryResponse.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ContainerRegistryResponse. + public partial class ContainerRegistryResponse + { + /// Initializes a new instance of ContainerRegistryResponse. + public ContainerRegistryResponse() + { + } + + /// Initializes a new instance of ContainerRegistryResponse. + /// . + internal ContainerRegistryResponse(string address) + { + Address = address; + } + + public string Address { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.Serialization.cs new file mode 100644 index 000000000000..9be736206454 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.Serialization.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ContainerResourceRequirements : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Cpu)) + { + writer.WritePropertyName("cpu"); + writer.WriteNumberValue(Cpu.Value); + } + if (Optional.IsDefined(MemoryInGB)) + { + writer.WritePropertyName("memoryInGB"); + writer.WriteNumberValue(MemoryInGB.Value); + } + if (Optional.IsDefined(Gpu)) + { + writer.WritePropertyName("gpu"); + writer.WriteNumberValue(Gpu.Value); + } + if (Optional.IsDefined(Fpga)) + { + writer.WritePropertyName("fpga"); + writer.WriteNumberValue(Fpga.Value); + } + writer.WriteEndObject(); + } + + internal static ContainerResourceRequirements DeserializeContainerResourceRequirements(JsonElement element) + { + Optional cpu = default; + Optional memoryInGB = default; + Optional gpu = default; + Optional fpga = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + cpu = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("memoryInGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + memoryInGB = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("gpu")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + gpu = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("fpga")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + fpga = property.Value.GetInt32(); + continue; + } + } + return new ContainerResourceRequirements(Optional.ToNullable(cpu), Optional.ToNullable(memoryInGB), Optional.ToNullable(gpu), Optional.ToNullable(fpga)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.cs new file mode 100644 index 000000000000..1b833823d879 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContainerResourceRequirements.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The resource requirements for the container (cpu and memory). + public partial class ContainerResourceRequirements + { + /// Initializes a new instance of ContainerResourceRequirements. + public ContainerResourceRequirements() + { + } + + /// Initializes a new instance of ContainerResourceRequirements. + /// The number of CPU cores on the container. + /// The amount of memory on the container in GB. + /// The number of GPU cores in the container. + /// The number of FPGA PCIE devices exposed to the container. Must be multiple of 2. + internal ContainerResourceRequirements(double? cpu, double? memoryInGB, int? gpu, int? fpga) + { + Cpu = cpu; + MemoryInGB = memoryInGB; + Gpu = gpu; + Fpga = fpga; + } + + /// The number of CPU cores on the container. + public double? Cpu { get; set; } + /// The amount of memory on the container in GB. + public double? MemoryInGB { get; set; } + /// The number of GPU cores in the container. + public int? Gpu { get; set; } + /// The number of FPGA PCIE devices exposed to the container. Must be multiple of 2. + public int? Fpga { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContentsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContentsType.cs new file mode 100644 index 000000000000..52cc2a09374d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ContentsType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Storage type backing the datastore. + public readonly partial struct ContentsType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ContentsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureBlobValue = "AzureBlob"; + private const string AzureDataLakeValue = "AzureDataLake"; + private const string AzureDataLakeGen2Value = "AzureDataLakeGen2"; + private const string AzureFileValue = "AzureFile"; + private const string AzureMySqlValue = "AzureMySql"; + private const string AzurePostgreSqlValue = "AzurePostgreSql"; + private const string AzureSqlDatabaseValue = "AzureSqlDatabase"; + private const string GlusterFsValue = "GlusterFs"; + + /// AzureBlob. + public static ContentsType AzureBlob { get; } = new ContentsType(AzureBlobValue); + /// AzureDataLake. + public static ContentsType AzureDataLake { get; } = new ContentsType(AzureDataLakeValue); + /// AzureDataLakeGen2. + public static ContentsType AzureDataLakeGen2 { get; } = new ContentsType(AzureDataLakeGen2Value); + /// AzureFile. + public static ContentsType AzureFile { get; } = new ContentsType(AzureFileValue); + /// AzureMySql. + public static ContentsType AzureMySql { get; } = new ContentsType(AzureMySqlValue); + /// AzurePostgreSql. + public static ContentsType AzurePostgreSql { get; } = new ContentsType(AzurePostgreSqlValue); + /// AzureSqlDatabase. + public static ContentsType AzureSqlDatabase { get; } = new ContentsType(AzureSqlDatabaseValue); + /// GlusterFs. + public static ContentsType GlusterFs { get; } = new ContentsType(GlusterFsValue); + /// Determines if two values are the same. + public static bool operator ==(ContentsType left, ContentsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContentsType left, ContentsType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContentsType(string value) => new ContentsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContentsType other && Equals(other); + /// + public bool Equals(ContentsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.Serialization.cs new file mode 100644 index 000000000000..999c685ff1fb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CreateEndpointVariantRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsDefault)) + { + writer.WritePropertyName("isDefault"); + writer.WriteBooleanValue(IsDefault.Value); + } + if (Optional.IsDefined(TrafficPercentile)) + { + writer.WritePropertyName("trafficPercentile"); + writer.WriteNumberValue(TrafficPercentile.Value); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Keys)) + { + writer.WritePropertyName("keys"); + writer.WriteObjectValue(Keys); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(EnvironmentImageRequest)) + { + writer.WritePropertyName("environmentImageRequest"); + writer.WriteObjectValue(EnvironmentImageRequest); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.cs new file mode 100644 index 000000000000..7d5f74139734 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateEndpointVariantRequest.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Variant properties. + public partial class CreateEndpointVariantRequest : CreateServiceRequest + { + /// Initializes a new instance of CreateEndpointVariantRequest. + public CreateEndpointVariantRequest() + { + ComputeType = new ComputeEnvironmentType("Custom"); + } + + /// Is this the default variant. + public bool? IsDefault { get; set; } + /// The amount of traffic variant receives. + public float? TrafficPercentile { get; set; } + /// The type of the variant. + public VariantType? Type { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.Serialization.cs new file mode 100644 index 000000000000..cf323c007629 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CreateServiceRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Keys)) + { + writer.WritePropertyName("keys"); + writer.WriteObjectValue(Keys); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(EnvironmentImageRequest)) + { + writer.WritePropertyName("environmentImageRequest"); + writer.WriteObjectValue(EnvironmentImageRequest); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.cs new file mode 100644 index 000000000000..7a073a8e87a7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequest.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The base class for creating a service. + public partial class CreateServiceRequest + { + /// Initializes a new instance of CreateServiceRequest. + public CreateServiceRequest() + { + KvTags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// The description of the service. + public string Description { get; set; } + /// The service tag dictionary. Tags are mutable. + public IDictionary KvTags { get; } + /// The service properties dictionary. Properties are immutable. + public IDictionary Properties { get; } + /// The authentication keys. + public AuthKeys Keys { get; set; } + /// The compute environment type for the service. + internal ComputeEnvironmentType ComputeType { get; set; } + /// The Environment, models and assets needed for inferencing. + public EnvironmentImageRequest EnvironmentImageRequest { get; set; } + /// The name of the Azure location/region. + public string Location { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.Serialization.cs new file mode 100644 index 000000000000..1ca3e8ac60be --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CreateServiceRequestEnvironmentImageRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DriverProgram)) + { + writer.WritePropertyName("driverProgram"); + writer.WriteStringValue(DriverProgram); + } + if (Optional.IsCollectionDefined(Assets)) + { + writer.WritePropertyName("assets"); + writer.WriteStartArray(); + foreach (var item in Assets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModelIds)) + { + writer.WritePropertyName("modelIds"); + writer.WriteStartArray(); + foreach (var item in ModelIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Models)) + { + writer.WritePropertyName("models"); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Environment)) + { + writer.WritePropertyName("environment"); + writer.WriteObjectValue(Environment); + } + if (Optional.IsDefined(EnvironmentReference)) + { + writer.WritePropertyName("environmentReference"); + writer.WriteObjectValue(EnvironmentReference); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.cs new file mode 100644 index 000000000000..c66ce1ddfe6e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestEnvironmentImageRequest.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Environment, models and assets needed for inferencing. + public partial class CreateServiceRequestEnvironmentImageRequest : EnvironmentImageRequest + { + /// Initializes a new instance of CreateServiceRequestEnvironmentImageRequest. + public CreateServiceRequestEnvironmentImageRequest() + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.Serialization.cs new file mode 100644 index 000000000000..1bb8c60b5000 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class CreateServiceRequestKeys : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PrimaryKey)) + { + writer.WritePropertyName("primaryKey"); + writer.WriteStringValue(PrimaryKey); + } + if (Optional.IsDefined(SecondaryKey)) + { + writer.WritePropertyName("secondaryKey"); + writer.WriteStringValue(SecondaryKey); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.cs new file mode 100644 index 000000000000..d7ef4b5e541b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreateServiceRequestKeys.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The authentication keys. + public partial class CreateServiceRequestKeys : AuthKeys + { + /// Initializes a new instance of CreateServiceRequestKeys. + public CreateServiceRequestKeys() + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreatedByType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreatedByType.cs new file mode 100644 index 000000000000..4f0291ed5efe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CreatedByType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The type of identity that created the resource. + public readonly partial struct CreatedByType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public CreatedByType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserValue = "User"; + private const string ApplicationValue = "Application"; + private const string ManagedIdentityValue = "ManagedIdentity"; + private const string KeyValue = "Key"; + + /// User. + public static CreatedByType User { get; } = new CreatedByType(UserValue); + /// Application. + public static CreatedByType Application { get; } = new CreatedByType(ApplicationValue); + /// ManagedIdentity. + public static CreatedByType ManagedIdentity { get; } = new CreatedByType(ManagedIdentityValue); + /// Key. + public static CreatedByType Key { get; } = new CreatedByType(KeyValue); + /// Determines if two values are the same. + public static bool operator ==(CreatedByType left, CreatedByType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CreatedByType left, CreatedByType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CreatedByType(string value) => new CreatedByType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CreatedByType other && Equals(other); + /// + public bool Equals(CreatedByType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CredentialsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CredentialsType.cs new file mode 100644 index 000000000000..43ad06205b90 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/CredentialsType.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Credential type used to authentication with storage. + public readonly partial struct CredentialsType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public CredentialsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AccountKeyValue = "AccountKey"; + private const string CertificateValue = "Certificate"; + private const string NoneValue = "None"; + private const string SasValue = "Sas"; + private const string ServicePrincipalValue = "ServicePrincipal"; + private const string SqlAdminValue = "SqlAdmin"; + + /// AccountKey. + public static CredentialsType AccountKey { get; } = new CredentialsType(AccountKeyValue); + /// Certificate. + public static CredentialsType Certificate { get; } = new CredentialsType(CertificateValue); + /// None. + public static CredentialsType None { get; } = new CredentialsType(NoneValue); + /// Sas. + public static CredentialsType Sas { get; } = new CredentialsType(SasValue); + /// ServicePrincipal. + public static CredentialsType ServicePrincipal { get; } = new CredentialsType(ServicePrincipalValue); + /// SqlAdmin. + public static CredentialsType SqlAdmin { get; } = new CredentialsType(SqlAdminValue); + /// Determines if two values are the same. + public static bool operator ==(CredentialsType left, CredentialsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CredentialsType left, CredentialsType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CredentialsType(string value) => new CredentialsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CredentialsType other && Equals(other); + /// + public bool Equals(CredentialsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.Serialization.cs new file mode 100644 index 000000000000..3feb675e165c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataBinding : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SourceDataReference)) + { + writer.WritePropertyName("sourceDataReference"); + writer.WriteStringValue(SourceDataReference); + } + if (Optional.IsDefined(LocalReference)) + { + writer.WritePropertyName("localReference"); + writer.WriteStringValue(LocalReference); + } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static DataBinding DeserializeDataBinding(JsonElement element) + { + Optional sourceDataReference = default; + Optional localReference = default; + Optional mode = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sourceDataReference")) + { + sourceDataReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("localReference")) + { + localReference = property.Value.GetString(); + continue; + } + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new DataBindingMode(property.Value.GetString()); + continue; + } + } + return new DataBinding(sourceDataReference.Value, localReference.Value, Optional.ToNullable(mode)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.cs new file mode 100644 index 000000000000..c79848ca5d4e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBinding.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Data binding definition. + public partial class DataBinding + { + /// Initializes a new instance of DataBinding. + public DataBinding() + { + } + + /// Initializes a new instance of DataBinding. + /// Reference to source data artifact. + /// Location of data inside the container process. + /// Mechanism for accessing the data artifact. + internal DataBinding(string sourceDataReference, string localReference, DataBindingMode? mode) + { + SourceDataReference = sourceDataReference; + LocalReference = localReference; + Mode = mode; + } + + /// Reference to source data artifact. + public string SourceDataReference { get; set; } + /// Location of data inside the container process. + public string LocalReference { get; set; } + /// Mechanism for accessing the data artifact. + public DataBindingMode? Mode { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBindingMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBindingMode.cs new file mode 100644 index 000000000000..4b480697e18b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataBindingMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Mechanism for accessing the data artifact. + public readonly partial struct DataBindingMode : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public DataBindingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MountValue = "Mount"; + private const string DownloadValue = "Download"; + private const string UploadValue = "Upload"; + + /// Mount. + public static DataBindingMode Mount { get; } = new DataBindingMode(MountValue); + /// Download. + public static DataBindingMode Download { get; } = new DataBindingMode(DownloadValue); + /// Upload. + public static DataBindingMode Upload { get; } = new DataBindingMode(UploadValue); + /// Determines if two values are the same. + public static bool operator ==(DataBindingMode left, DataBindingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataBindingMode left, DataBindingMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataBindingMode(string value) => new DataBindingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataBindingMode other && Equals(other); + /// + public bool Equals(DataBindingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.Serialization.cs new file mode 100644 index 000000000000..85160ab2ece0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataContainer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + } + + internal static DataContainer DeserializeDataContainer(JsonElement element) + { + Optional> properties = default; + Optional> tags = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + } + return new DataContainer(Optional.ToDictionary(properties), Optional.ToDictionary(tags), description.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.cs new file mode 100644 index 000000000000..463d939f465f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainer.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DataContainer. + public partial class DataContainer + { + /// Initializes a new instance of DataContainer. + public DataContainer() + { + Properties = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DataContainer. + /// Dictionary of <string>. + /// Dictionary of <string>. + /// . + internal DataContainer(IDictionary properties, IDictionary tags, string description) + { + Properties = properties; + Tags = tags; + Description = description; + } + + /// Dictionary of <string>. + public IDictionary Properties { get; } + /// Dictionary of <string>. + public IDictionary Tags { get; } + public string Description { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.Serialization.cs new file mode 100644 index 000000000000..f9695df457d8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataContainerResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static DataContainerResource DeserializeDataContainerResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + DataContainer properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = DataContainer.DeserializeDataContainer(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new DataContainerResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.cs new file mode 100644 index 000000000000..c9623322c2c4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class DataContainerResource + { + /// Initializes a new instance of DataContainerResource. + /// . + /// is null. + public DataContainerResource(DataContainer properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of DataContainerResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// . + /// Metadata pertaining to creation and last modification of the resource. + internal DataContainerResource(string id, string name, string type, DataContainer properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + public DataContainer Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..40df5ce93cf6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataContainerResourceArmPaginatedResult + { + internal static DataContainerResourceArmPaginatedResult DeserializeDataContainerResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataContainerResource.DeserializeDataContainerResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DataContainerResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..836bd903525c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of DataContainer entities. + public partial class DataContainerResourceArmPaginatedResult + { + /// Initializes a new instance of DataContainerResourceArmPaginatedResult. + internal DataContainerResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DataContainerResourceArmPaginatedResult. + /// An array of objects of type DataContainer. + /// . + internal DataContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type DataContainer. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.Serialization.cs new file mode 100644 index 000000000000..f49aa358dd5a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataFactory : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static DataFactory DeserializeDataFactory(JsonElement element) + { + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new DataFactory(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.cs new file mode 100644 index 000000000000..191615ae8cc9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataFactory.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A DataFactory compute. + public partial class DataFactory : Compute + { + /// Initializes a new instance of DataFactory. + public DataFactory() + { + ComputeType = ComputeType.DataFactory; + } + + /// Initializes a new instance of DataFactory. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + internal DataFactory(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + { + ComputeType = computeType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.Serialization.cs new file mode 100644 index 000000000000..7f13ac18209b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataLakeAnalytics : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static DataLakeAnalytics DeserializeDataLakeAnalytics(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = DataLakeAnalyticsProperties.DeserializeDataLakeAnalyticsProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new DataLakeAnalytics(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.cs new file mode 100644 index 000000000000..23e6a7f20e6b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalytics.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A DataLakeAnalytics compute. + public partial class DataLakeAnalytics : Compute + { + /// Initializes a new instance of DataLakeAnalytics. + public DataLakeAnalytics() + { + ComputeType = ComputeType.DataLakeAnalytics; + } + + /// Initializes a new instance of DataLakeAnalytics. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// . + internal DataLakeAnalytics(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, DataLakeAnalyticsProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + { + Properties = properties; + ComputeType = computeType; + } + + public DataLakeAnalyticsProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalyticsProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalyticsProperties.Serialization.cs new file mode 100644 index 000000000000..17eb5ee52256 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalyticsProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataLakeAnalyticsProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DataLakeStoreAccountName)) + { + writer.WritePropertyName("dataLakeStoreAccountName"); + writer.WriteStringValue(DataLakeStoreAccountName); + } + writer.WriteEndObject(); + } + + internal static DataLakeAnalyticsProperties DeserializeDataLakeAnalyticsProperties(JsonElement element) + { + Optional dataLakeStoreAccountName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataLakeStoreAccountName")) + { + dataLakeStoreAccountName = property.Value.GetString(); + continue; + } + } + return new DataLakeAnalyticsProperties(dataLakeStoreAccountName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalyticsProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalyticsProperties.cs new file mode 100644 index 000000000000..4e5ce25861f7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataLakeAnalyticsProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DataLakeAnalyticsProperties. + public partial class DataLakeAnalyticsProperties + { + /// Initializes a new instance of DataLakeAnalyticsProperties. + public DataLakeAnalyticsProperties() + { + } + + /// Initializes a new instance of DataLakeAnalyticsProperties. + /// DataLake Store Account Name. + internal DataLakeAnalyticsProperties(string dataLakeStoreAccountName) + { + DataLakeStoreAccountName = dataLakeStoreAccountName; + } + + /// DataLake Store Account Name. + public string DataLakeStoreAccountName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.Serialization.cs new file mode 100644 index 000000000000..698e352fe95c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.Serialization.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataVersion : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DatasetType)) + { + writer.WritePropertyName("datasetType"); + writer.WriteStringValue(DatasetType.Value.ToString()); + } + if (Optional.IsDefined(DatastoreId)) + { + writer.WritePropertyName("datastoreId"); + writer.WriteStringValue(DatastoreId); + } + if (Optional.IsDefined(AssetPath)) + { + writer.WritePropertyName("assetPath"); + writer.WriteObjectValue(AssetPath); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static DataVersion DeserializeDataVersion(JsonElement element) + { + Optional datasetType = default; + Optional datastoreId = default; + Optional assetPath = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("datasetType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + datasetType = new DatasetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("datastoreId")) + { + datastoreId = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + assetPath = AssetPath.DeserializeAssetPath(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new DataVersion(Optional.ToNullable(datasetType), datastoreId.Value, assetPath.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.cs new file mode 100644 index 000000000000..f6ae79970cb8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersion.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of an DatasetDto. + public partial class DataVersion + { + /// Initializes a new instance of DataVersion. + public DataVersion() + { + Tags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DataVersion. + /// The Format of dataset. + /// The asset datastoreId. + /// Details of an AssetUri. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + internal DataVersion(DatasetType? datasetType, string datastoreId, AssetPath assetPath, string description, IDictionary tags, IDictionary properties) + { + DatasetType = datasetType; + DatastoreId = datastoreId; + AssetPath = assetPath; + Description = description; + Tags = tags; + Properties = properties; + } + + /// The Format of dataset. + public DatasetType? DatasetType { get; set; } + /// The asset datastoreId. + public string DatastoreId { get; set; } + /// Details of an AssetUri. + public AssetPath AssetPath { get; set; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + /// The asset property dictionary. + public IDictionary Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.Serialization.cs new file mode 100644 index 000000000000..94066591d365 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataVersionResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static DataVersionResource DeserializeDataVersionResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + DataVersion properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = DataVersion.DeserializeDataVersion(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new DataVersionResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.cs new file mode 100644 index 000000000000..8357ba940ecb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResource.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class DataVersionResource + { + /// Initializes a new instance of DataVersionResource. + /// Details of an DatasetDto. + /// is null. + public DataVersionResource(DataVersion properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of DataVersionResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// Details of an DatasetDto. + /// Metadata pertaining to creation and last modification of the resource. + internal DataVersionResource(string id, string name, string type, DataVersion properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + /// Details of an DatasetDto. + public DataVersion Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..cddb505f2c11 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DataVersionResourceArmPaginatedResult + { + internal static DataVersionResourceArmPaginatedResult DeserializeDataVersionResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataVersionResource.DeserializeDataVersionResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DataVersionResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..c17f53f2e3da --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DataVersionResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of DataVersion entities. + public partial class DataVersionResourceArmPaginatedResult + { + /// Initializes a new instance of DataVersionResourceArmPaginatedResult. + internal DataVersionResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DataVersionResourceArmPaginatedResult. + /// An array of objects of type DataVersion. + /// . + internal DataVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type DataVersion. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.Serialization.cs new file mode 100644 index 000000000000..f8c11dd60b7d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Databricks : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static Databricks DeserializeDatabricks(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = DatabricksProperties.DeserializeDatabricksProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new Databricks(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.cs new file mode 100644 index 000000000000..70930969a62d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Databricks.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A DataFactory compute. + public partial class Databricks : Compute + { + /// Initializes a new instance of Databricks. + public Databricks() + { + ComputeType = ComputeType.Databricks; + } + + /// Initializes a new instance of Databricks. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// . + internal Databricks(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, DatabricksProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + { + Properties = properties; + ComputeType = computeType; + } + + public DatabricksProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecrets.Serialization.cs new file mode 100644 index 000000000000..9c5edda9a7bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecrets.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DatabricksComputeSecrets + { + internal static DatabricksComputeSecrets DeserializeDatabricksComputeSecrets(JsonElement element) + { + Optional databricksAccessToken = default; + ComputeType computeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databricksAccessToken")) + { + databricksAccessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + } + return new DatabricksComputeSecrets(computeType, databricksAccessToken.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecrets.cs new file mode 100644 index 000000000000..4ce342edc13b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksComputeSecrets.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Secrets related to a Machine Learning compute based on Databricks. + public partial class DatabricksComputeSecrets : ComputeSecrets + { + /// Initializes a new instance of DatabricksComputeSecrets. + internal DatabricksComputeSecrets() + { + ComputeType = ComputeType.Databricks; + } + + /// Initializes a new instance of DatabricksComputeSecrets. + /// The type of compute. + /// access token for databricks account. + internal DatabricksComputeSecrets(ComputeType computeType, string databricksAccessToken) : base(computeType) + { + DatabricksAccessToken = databricksAccessToken; + ComputeType = computeType; + } + + /// access token for databricks account. + public string DatabricksAccessToken { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.Serialization.cs new file mode 100644 index 000000000000..234e25e38c33 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DatabricksProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DatabricksAccessToken)) + { + writer.WritePropertyName("databricksAccessToken"); + writer.WriteStringValue(DatabricksAccessToken); + } + writer.WriteEndObject(); + } + + internal static DatabricksProperties DeserializeDatabricksProperties(JsonElement element) + { + Optional databricksAccessToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databricksAccessToken")) + { + databricksAccessToken = property.Value.GetString(); + continue; + } + } + return new DatabricksProperties(databricksAccessToken.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.cs new file mode 100644 index 000000000000..708fdab7ae82 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatabricksProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DatabricksProperties. + public partial class DatabricksProperties + { + /// Initializes a new instance of DatabricksProperties. + public DatabricksProperties() + { + } + + /// Initializes a new instance of DatabricksProperties. + /// Databricks access token. + internal DatabricksProperties(string databricksAccessToken) + { + DatabricksAccessToken = databricksAccessToken; + } + + /// Databricks access token. + public string DatabricksAccessToken { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.Serialization.cs new file mode 100644 index 000000000000..71b901ed510e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DatasetReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + writer.WriteEndObject(); + } + + internal static DatasetReference DeserializeDatasetReference(JsonElement element) + { + Optional name = default; + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + } + return new DatasetReference(name.Value, id.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.cs new file mode 100644 index 000000000000..105fa0f59fd0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetReference.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The dataset reference object. + public partial class DatasetReference + { + /// Initializes a new instance of DatasetReference. + public DatasetReference() + { + } + + /// Initializes a new instance of DatasetReference. + /// The name of the dataset reference. + /// The id of the dataset reference. + internal DatasetReference(string name, string id) + { + Name = name; + Id = id; + } + + /// The name of the dataset reference. + public string Name { get; set; } + /// The id of the dataset reference. + public string Id { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetType.cs new file mode 100644 index 000000000000..6f819b197087 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatasetType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Format of dataset. + public readonly partial struct DatasetType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public DatasetType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SimpleValue = "Simple"; + private const string DataflowValue = "Dataflow"; + + /// Simple. + public static DatasetType Simple { get; } = new DatasetType(SimpleValue); + /// Dataflow. + public static DatasetType Dataflow { get; } = new DatasetType(DataflowValue); + /// Determines if two values are the same. + public static bool operator ==(DatasetType left, DatasetType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatasetType left, DatasetType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DatasetType(string value) => new DatasetType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatasetType other && Equals(other); + /// + public bool Equals(DatasetType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.Serialization.cs new file mode 100644 index 000000000000..5ea586c4af6e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DatastoreContents : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(AzureDataLake)) + { + writer.WritePropertyName("azureDataLake"); + writer.WriteObjectValue(AzureDataLake); + } + if (Optional.IsDefined(AzureMySql)) + { + writer.WritePropertyName("azureMySql"); + writer.WriteObjectValue(AzureMySql); + } + if (Optional.IsDefined(AzurePostgreSql)) + { + writer.WritePropertyName("azurePostgreSql"); + writer.WriteObjectValue(AzurePostgreSql); + } + if (Optional.IsDefined(AzureSqlDatabase)) + { + writer.WritePropertyName("azureSqlDatabase"); + writer.WriteObjectValue(AzureSqlDatabase); + } + if (Optional.IsDefined(AzureStorage)) + { + writer.WritePropertyName("azureStorage"); + writer.WriteObjectValue(AzureStorage); + } + if (Optional.IsDefined(GlusterFs)) + { + writer.WritePropertyName("glusterFs"); + writer.WriteObjectValue(GlusterFs); + } + writer.WriteEndObject(); + } + + internal static DatastoreContents DeserializeDatastoreContents(JsonElement element) + { + ContentsType type = default; + Optional azureDataLake = default; + Optional azureMySql = default; + Optional azurePostgreSql = default; + Optional azureSqlDatabase = default; + Optional azureStorage = default; + Optional glusterFs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = new ContentsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("azureDataLake")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + azureDataLake = AzureDataLakeSection.DeserializeAzureDataLakeSection(property.Value); + continue; + } + if (property.NameEquals("azureMySql")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + azureMySql = AzureMySqlSection.DeserializeAzureMySqlSection(property.Value); + continue; + } + if (property.NameEquals("azurePostgreSql")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + azurePostgreSql = AzurePostgreSqlSection.DeserializeAzurePostgreSqlSection(property.Value); + continue; + } + if (property.NameEquals("azureSqlDatabase")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + azureSqlDatabase = AzureSqlDatabaseSection.DeserializeAzureSqlDatabaseSection(property.Value); + continue; + } + if (property.NameEquals("azureStorage")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + azureStorage = AzureStorageSection.DeserializeAzureStorageSection(property.Value); + continue; + } + if (property.NameEquals("glusterFs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + glusterFs = GlusterFsSection.DeserializeGlusterFsSection(property.Value); + continue; + } + } + return new DatastoreContents(type, azureDataLake.Value, azureMySql.Value, azurePostgreSql.Value, azureSqlDatabase.Value, azureStorage.Value, glusterFs.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.cs new file mode 100644 index 000000000000..b739d355dd03 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreContents.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DatastoreContents. + public partial class DatastoreContents + { + /// Initializes a new instance of DatastoreContents. + /// Storage type backing the datastore. + public DatastoreContents(ContentsType type) + { + Type = type; + } + + /// Initializes a new instance of DatastoreContents. + /// Storage type backing the datastore. + /// . + /// . + /// . + /// . + /// . + /// . + internal DatastoreContents(ContentsType type, AzureDataLakeSection azureDataLake, AzureMySqlSection azureMySql, AzurePostgreSqlSection azurePostgreSql, AzureSqlDatabaseSection azureSqlDatabase, AzureStorageSection azureStorage, GlusterFsSection glusterFs) + { + Type = type; + AzureDataLake = azureDataLake; + AzureMySql = azureMySql; + AzurePostgreSql = azurePostgreSql; + AzureSqlDatabase = azureSqlDatabase; + AzureStorage = azureStorage; + GlusterFs = glusterFs; + } + + /// Storage type backing the datastore. + public ContentsType Type { get; set; } + public AzureDataLakeSection AzureDataLake { get; set; } + public AzureMySqlSection AzureMySql { get; set; } + public AzurePostgreSqlSection AzurePostgreSql { get; set; } + public AzureSqlDatabaseSection AzureSqlDatabase { get; set; } + public AzureStorageSection AzureStorage { get; set; } + public GlusterFsSection GlusterFs { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.Serialization.cs new file mode 100644 index 000000000000..91e75d4f5432 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DatastoreCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(AccountKey)) + { + writer.WritePropertyName("accountKey"); + writer.WriteObjectValue(AccountKey); + } + if (Optional.IsDefined(Certificate)) + { + writer.WritePropertyName("certificate"); + writer.WriteObjectValue(Certificate); + } + if (Optional.IsDefined(Sas)) + { + writer.WritePropertyName("sas"); + writer.WriteObjectValue(Sas); + } + if (Optional.IsDefined(ServicePrincipal)) + { + writer.WritePropertyName("servicePrincipal"); + writer.WriteObjectValue(ServicePrincipal); + } + if (Optional.IsDefined(SqlAdmin)) + { + writer.WritePropertyName("sqlAdmin"); + writer.WriteObjectValue(SqlAdmin); + } + writer.WriteEndObject(); + } + + internal static DatastoreCredentials DeserializeDatastoreCredentials(JsonElement element) + { + CredentialsType type = default; + Optional accountKey = default; + Optional certificate = default; + Optional sas = default; + Optional servicePrincipal = default; + Optional sqlAdmin = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = new CredentialsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("accountKey")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + accountKey = AccountKeySection.DeserializeAccountKeySection(property.Value); + continue; + } + if (property.NameEquals("certificate")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + certificate = CertificateSection.DeserializeCertificateSection(property.Value); + continue; + } + if (property.NameEquals("sas")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sas = SasSection.DeserializeSasSection(property.Value); + continue; + } + if (property.NameEquals("servicePrincipal")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + servicePrincipal = ServicePrincipalSection.DeserializeServicePrincipalSection(property.Value); + continue; + } + if (property.NameEquals("sqlAdmin")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sqlAdmin = SqlAdminSection.DeserializeSqlAdminSection(property.Value); + continue; + } + } + return new DatastoreCredentials(type, accountKey.Value, certificate.Value, sas.Value, servicePrincipal.Value, sqlAdmin.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.cs new file mode 100644 index 000000000000..9f0526e71f57 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreCredentials.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DatastoreCredentials. + public partial class DatastoreCredentials + { + /// Initializes a new instance of DatastoreCredentials. + /// Credential type used to authentication with storage. + public DatastoreCredentials(CredentialsType type) + { + Type = type; + } + + /// Initializes a new instance of DatastoreCredentials. + /// Credential type used to authentication with storage. + /// . + /// . + /// . + /// . + /// . + internal DatastoreCredentials(CredentialsType type, AccountKeySection accountKey, CertificateSection certificate, SasSection sas, ServicePrincipalSection servicePrincipal, SqlAdminSection sqlAdmin) + { + Type = type; + AccountKey = accountKey; + Certificate = certificate; + Sas = sas; + ServicePrincipal = servicePrincipal; + SqlAdmin = sqlAdmin; + } + + /// Credential type used to authentication with storage. + public CredentialsType Type { get; set; } + public AccountKeySection AccountKey { get; set; } + public CertificateSection Certificate { get; set; } + public SasSection Sas { get; set; } + public ServicePrincipalSection ServicePrincipal { get; set; } + public SqlAdminSection SqlAdmin { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.Serialization.cs new file mode 100644 index 000000000000..fe39cc06879a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DatastoreProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("contents"); + writer.WriteObjectValue(Contents); + if (Optional.IsDefined(IsDefault)) + { + writer.WritePropertyName("isDefault"); + writer.WriteBooleanValue(IsDefault.Value); + } + if (Optional.IsDefined(LinkedInfo)) + { + writer.WritePropertyName("linkedInfo"); + writer.WriteObjectValue(LinkedInfo); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static DatastoreProperties DeserializeDatastoreProperties(JsonElement element) + { + DatastoreContents contents = default; + Optional hasBeenValidated = default; + Optional isDefault = default; + Optional linkedInfo = default; + Optional> properties = default; + Optional description = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("contents")) + { + contents = DatastoreContents.DeserializeDatastoreContents(property.Value); + continue; + } + if (property.NameEquals("hasBeenValidated")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + hasBeenValidated = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("linkedInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + linkedInfo = LinkedInfo.DeserializeLinkedInfo(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + } + return new DatastoreProperties(contents, Optional.ToNullable(hasBeenValidated), Optional.ToNullable(isDefault), linkedInfo.Value, Optional.ToDictionary(properties), description.Value, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.cs new file mode 100644 index 000000000000..0424d364f9f0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastoreProperties.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DatastoreProperties. + public partial class DatastoreProperties + { + /// Initializes a new instance of DatastoreProperties. + /// . + /// is null. + public DatastoreProperties(DatastoreContents contents) + { + if (contents == null) + { + throw new ArgumentNullException(nameof(contents)); + } + + Contents = contents; + Properties = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DatastoreProperties. + /// . + /// Whether the service has validated access to the datastore with the provided credentials. + /// Whether this datastore is the default for the workspace. + /// . + /// Dictionary of <string>. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + internal DatastoreProperties(DatastoreContents contents, bool? hasBeenValidated, bool? isDefault, LinkedInfo linkedInfo, IDictionary properties, string description, IDictionary tags) + { + Contents = contents; + HasBeenValidated = hasBeenValidated; + IsDefault = isDefault; + LinkedInfo = linkedInfo; + Properties = properties; + Description = description; + Tags = tags; + } + + public DatastoreContents Contents { get; set; } + /// Whether the service has validated access to the datastore with the provided credentials. + public bool? HasBeenValidated { get; } + /// Whether this datastore is the default for the workspace. + public bool? IsDefault { get; set; } + public LinkedInfo LinkedInfo { get; set; } + /// Dictionary of <string>. + public IDictionary Properties { get; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.Serialization.cs new file mode 100644 index 000000000000..15142b30ab3d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DatastorePropertiesResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static DatastorePropertiesResource DeserializeDatastorePropertiesResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + DatastoreProperties properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = DatastoreProperties.DeserializeDatastoreProperties(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new DatastorePropertiesResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.cs new file mode 100644 index 000000000000..c13d2d9c24ae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class DatastorePropertiesResource + { + /// Initializes a new instance of DatastorePropertiesResource. + /// . + /// is null. + public DatastorePropertiesResource(DatastoreProperties properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of DatastorePropertiesResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// . + /// Metadata pertaining to creation and last modification of the resource. + internal DatastorePropertiesResource(string id, string name, string type, DatastoreProperties properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + public DatastoreProperties Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..2c10f519a662 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DatastorePropertiesResourceArmPaginatedResult + { + internal static DatastorePropertiesResourceArmPaginatedResult DeserializeDatastorePropertiesResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatastorePropertiesResource.DeserializeDatastorePropertiesResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DatastorePropertiesResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..affc94061034 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DatastorePropertiesResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of DatastoreProperties entities. + public partial class DatastorePropertiesResourceArmPaginatedResult + { + /// Initializes a new instance of DatastorePropertiesResourceArmPaginatedResult. + internal DatastorePropertiesResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DatastorePropertiesResourceArmPaginatedResult. + /// An array of objects of type DatastoreProperties. + /// . + internal DatastorePropertiesResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type DatastoreProperties. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DeploymentType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DeploymentType.cs new file mode 100644 index 000000000000..f0b70f17cbb2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DeploymentType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The deployment type for the service. + public readonly partial struct DeploymentType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public DeploymentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GrpcRealtimeEndpointValue = "GRPCRealtimeEndpoint"; + private const string HttpRealtimeEndpointValue = "HttpRealtimeEndpoint"; + private const string BatchValue = "Batch"; + + /// GRPCRealtimeEndpoint. + public static DeploymentType GrpcRealtimeEndpoint { get; } = new DeploymentType(GrpcRealtimeEndpointValue); + /// HttpRealtimeEndpoint. + public static DeploymentType HttpRealtimeEndpoint { get; } = new DeploymentType(HttpRealtimeEndpointValue); + /// Batch. + public static DeploymentType Batch { get; } = new DeploymentType(BatchValue); + /// Determines if two values are the same. + public static bool operator ==(DeploymentType left, DeploymentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeploymentType left, DeploymentType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeploymentType(string value) => new DeploymentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeploymentType other && Equals(other); + /// + public bool Equals(DeploymentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.Serialization.cs new file mode 100644 index 000000000000..3907ad55c2f9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DistributionConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("distributionType"); + writer.WriteStringValue(DistributionType.ToString()); + writer.WriteEndObject(); + } + + internal static DistributionConfiguration DeserializeDistributionConfiguration(JsonElement element) + { + DistributionType distributionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("distributionType")) + { + distributionType = new DistributionType(property.Value.GetString()); + continue; + } + } + return new DistributionConfiguration(distributionType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.cs new file mode 100644 index 000000000000..d91fe4cf19e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionConfiguration.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The DistributionConfiguration. + public partial class DistributionConfiguration + { + /// Initializes a new instance of DistributionConfiguration. + public DistributionConfiguration() + { + } + + /// Initializes a new instance of DistributionConfiguration. + /// Specifies the type of distribution framework. + internal DistributionConfiguration(DistributionType distributionType) + { + DistributionType = distributionType; + } + + /// Specifies the type of distribution framework. + internal DistributionType DistributionType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionType.cs new file mode 100644 index 000000000000..befd7f748a3c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DistributionType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Specifies the type of distribution framework. + public readonly partial struct DistributionType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public DistributionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PyTorchValue = "PyTorch"; + private const string TensorFlowValue = "TensorFlow"; + private const string MpiValue = "Mpi"; + + /// PyTorch. + public static DistributionType PyTorch { get; } = new DistributionType(PyTorchValue); + /// TensorFlow. + public static DistributionType TensorFlow { get; } = new DistributionType(TensorFlowValue); + /// Mpi. + public static DistributionType Mpi { get; } = new DistributionType(MpiValue); + /// Determines if two values are the same. + public static bool operator ==(DistributionType left, DistributionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DistributionType left, DistributionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DistributionType(string value) => new DistributionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DistributionType other && Equals(other); + /// + public bool Equals(DistributionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.Serialization.cs new file mode 100644 index 000000000000..af9ce631df3f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class DockerSpecification : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static DockerSpecification DeserializeDockerSpecification(JsonElement element) + { + DockerSpecificationType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = new DockerSpecificationType(property.Value.GetString()); + continue; + } + } + return new DockerSpecification(type); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.cs new file mode 100644 index 000000000000..64a8af4e574e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecification.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Class to represent configuration settings for Docker. + public partial class DockerSpecification + { + /// Initializes a new instance of DockerSpecification. + public DockerSpecification() + { + } + + /// Initializes a new instance of DockerSpecification. + /// Docker specification must be either Build or Image. + internal DockerSpecification(DockerSpecificationType type) + { + Type = type; + } + + /// Docker specification must be either Build or Image. + internal DockerSpecificationType Type { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecificationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecificationType.cs new file mode 100644 index 000000000000..b1160e2d49d9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/DockerSpecificationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Docker specification must be either Build or Image. + public readonly partial struct DockerSpecificationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public DockerSpecificationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BuildValue = "Build"; + private const string ImageValue = "Image"; + + /// Build. + public static DockerSpecificationType Build { get; } = new DockerSpecificationType(BuildValue); + /// Image. + public static DockerSpecificationType Image { get; } = new DockerSpecificationType(ImageValue); + /// Determines if two values are the same. + public static bool operator ==(DockerSpecificationType left, DockerSpecificationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DockerSpecificationType left, DockerSpecificationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DockerSpecificationType(string value) => new DockerSpecificationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DockerSpecificationType other && Equals(other); + /// + public bool Equals(DockerSpecificationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.Serialization.cs new file mode 100644 index 000000000000..8d51696ac4f8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EarlyTerminationPolicyConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("policyType"); + writer.WriteStringValue(PolicyType.ToString()); + if (Optional.IsDefined(EvaluationInterval)) + { + writer.WritePropertyName("evaluationInterval"); + writer.WriteNumberValue(EvaluationInterval.Value); + } + if (Optional.IsDefined(DelayEvaluation)) + { + writer.WritePropertyName("delayEvaluation"); + writer.WriteNumberValue(DelayEvaluation.Value); + } + writer.WriteEndObject(); + } + + internal static EarlyTerminationPolicyConfiguration DeserializeEarlyTerminationPolicyConfiguration(JsonElement element) + { + EarlyTerminationPolicyType policyType = default; + Optional evaluationInterval = default; + Optional delayEvaluation = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyType")) + { + policyType = new EarlyTerminationPolicyType(property.Value.GetString()); + continue; + } + if (property.NameEquals("evaluationInterval")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + evaluationInterval = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("delayEvaluation")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + delayEvaluation = property.Value.GetInt32(); + continue; + } + } + return new EarlyTerminationPolicyConfiguration(policyType, Optional.ToNullable(evaluationInterval), Optional.ToNullable(delayEvaluation)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.cs new file mode 100644 index 000000000000..532e902005a9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyConfiguration.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Early termination policies enable canceling poor-performing runs before they complete. + public partial class EarlyTerminationPolicyConfiguration + { + /// Initializes a new instance of EarlyTerminationPolicyConfiguration. + public EarlyTerminationPolicyConfiguration() + { + } + + /// Initializes a new instance of EarlyTerminationPolicyConfiguration. + /// Name of policy configuration. + /// . + /// . + internal EarlyTerminationPolicyConfiguration(EarlyTerminationPolicyType policyType, int? evaluationInterval, int? delayEvaluation) + { + PolicyType = policyType; + EvaluationInterval = evaluationInterval; + DelayEvaluation = delayEvaluation; + } + + /// Name of policy configuration. + internal EarlyTerminationPolicyType PolicyType { get; set; } + public int? EvaluationInterval { get; set; } + public int? DelayEvaluation { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyType.cs new file mode 100644 index 000000000000..3725f55e0318 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EarlyTerminationPolicyType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Name of policy configuration. + public readonly partial struct EarlyTerminationPolicyType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public EarlyTerminationPolicyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BanditValue = "Bandit"; + private const string MedianStoppingValue = "MedianStopping"; + private const string TruncationSelectionValue = "TruncationSelection"; + + /// Bandit. + public static EarlyTerminationPolicyType Bandit { get; } = new EarlyTerminationPolicyType(BanditValue); + /// MedianStopping. + public static EarlyTerminationPolicyType MedianStopping { get; } = new EarlyTerminationPolicyType(MedianStoppingValue); + /// TruncationSelection. + public static EarlyTerminationPolicyType TruncationSelection { get; } = new EarlyTerminationPolicyType(TruncationSelectionValue); + /// Determines if two values are the same. + public static bool operator ==(EarlyTerminationPolicyType left, EarlyTerminationPolicyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EarlyTerminationPolicyType left, EarlyTerminationPolicyType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EarlyTerminationPolicyType(string value) => new EarlyTerminationPolicyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EarlyTerminationPolicyType other && Equals(other); + /// + public bool Equals(EarlyTerminationPolicyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.Serialization.cs new file mode 100644 index 000000000000..8eea605b95ce --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EncryptionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("vaultBaseUrl"); + writer.WriteStringValue(VaultBaseUrl); + writer.WritePropertyName("keyName"); + writer.WriteStringValue(KeyName); + writer.WritePropertyName("keyVersion"); + writer.WriteStringValue(KeyVersion); + writer.WriteEndObject(); + } + + internal static EncryptionProperties DeserializeEncryptionProperties(JsonElement element) + { + string vaultBaseUrl = default; + string keyName = default; + string keyVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vaultBaseUrl")) + { + vaultBaseUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyName")) + { + keyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyVersion")) + { + keyVersion = property.Value.GetString(); + continue; + } + } + return new EncryptionProperties(vaultBaseUrl, keyName, keyVersion); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.cs new file mode 100644 index 000000000000..b851a92a1516 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperties.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The EncryptionProperties. + public partial class EncryptionProperties + { + /// Initializes a new instance of EncryptionProperties. + /// vault base Url. + /// Encryption Key name. + /// Encryption Key Version. + /// , , or is null. + public EncryptionProperties(string vaultBaseUrl, string keyName, string keyVersion) + { + if (vaultBaseUrl == null) + { + throw new ArgumentNullException(nameof(vaultBaseUrl)); + } + if (keyName == null) + { + throw new ArgumentNullException(nameof(keyName)); + } + if (keyVersion == null) + { + throw new ArgumentNullException(nameof(keyVersion)); + } + + VaultBaseUrl = vaultBaseUrl; + KeyName = keyName; + KeyVersion = keyVersion; + } + + /// vault base Url. + public string VaultBaseUrl { get; set; } + /// Encryption Key name. + public string KeyName { get; set; } + /// Encryption Key Version. + public string KeyVersion { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.Serialization.cs new file mode 100644 index 000000000000..de7adee04b8b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EncryptionProperty : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("keyVaultProperties"); + writer.WriteObjectValue(KeyVaultProperties); + writer.WriteEndObject(); + } + + internal static EncryptionProperty DeserializeEncryptionProperty(JsonElement element) + { + EncryptionStatus status = default; + KeyVaultProperties keyVaultProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + status = new EncryptionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("keyVaultProperties")) + { + keyVaultProperties = KeyVaultProperties.DeserializeKeyVaultProperties(property.Value); + continue; + } + } + return new EncryptionProperty(status, keyVaultProperties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.cs new file mode 100644 index 000000000000..b638e50713bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionProperty.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The EncryptionProperty. + public partial class EncryptionProperty + { + /// Initializes a new instance of EncryptionProperty. + /// Indicates whether or not the encryption is enabled for the workspace. + /// Customer Key vault properties. + /// is null. + public EncryptionProperty(EncryptionStatus status, KeyVaultProperties keyVaultProperties) + { + if (keyVaultProperties == null) + { + throw new ArgumentNullException(nameof(keyVaultProperties)); + } + + Status = status; + KeyVaultProperties = keyVaultProperties; + } + + /// Indicates whether or not the encryption is enabled for the workspace. + public EncryptionStatus Status { get; set; } + /// Customer Key vault properties. + public KeyVaultProperties KeyVaultProperties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionStatus.cs new file mode 100644 index 000000000000..89dda276d829 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EncryptionStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Indicates whether or not the encryption is enabled for the workspace. + public readonly partial struct EncryptionStatus : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public EncryptionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static EncryptionStatus Enabled { get; } = new EncryptionStatus(EnabledValue); + /// Disabled. + public static EncryptionStatus Disabled { get; } = new EncryptionStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(EncryptionStatus left, EncryptionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EncryptionStatus left, EncryptionStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EncryptionStatus(string value) => new EncryptionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EncryptionStatus other && Equals(other); + /// + public bool Equals(EncryptionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.Serialization.cs new file mode 100644 index 000000000000..2779b3e8809b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentContainer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + } + + internal static EnvironmentContainer DeserializeEnvironmentContainer(JsonElement element) + { + Optional> properties = default; + Optional> tags = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + } + return new EnvironmentContainer(Optional.ToDictionary(properties), Optional.ToDictionary(tags), description.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.cs new file mode 100644 index 000000000000..f4d6b4aee460 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainer.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The EnvironmentContainer. + public partial class EnvironmentContainer + { + /// Initializes a new instance of EnvironmentContainer. + public EnvironmentContainer() + { + Properties = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of EnvironmentContainer. + /// Dictionary of <string>. + /// Dictionary of <string>. + /// . + internal EnvironmentContainer(IDictionary properties, IDictionary tags, string description) + { + Properties = properties; + Tags = tags; + Description = description; + } + + /// Dictionary of <string>. + public IDictionary Properties { get; } + /// Dictionary of <string>. + public IDictionary Tags { get; } + public string Description { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.Serialization.cs new file mode 100644 index 000000000000..f2563b90015a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentContainerResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static EnvironmentContainerResource DeserializeEnvironmentContainerResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + EnvironmentContainer properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = EnvironmentContainer.DeserializeEnvironmentContainer(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new EnvironmentContainerResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.cs new file mode 100644 index 000000000000..6ccaaebda2a6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class EnvironmentContainerResource + { + /// Initializes a new instance of EnvironmentContainerResource. + /// . + /// is null. + public EnvironmentContainerResource(EnvironmentContainer properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of EnvironmentContainerResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// . + /// Metadata pertaining to creation and last modification of the resource. + internal EnvironmentContainerResource(string id, string name, string type, EnvironmentContainer properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + public EnvironmentContainer Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..e2fafe4a6b12 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentContainerResourceArmPaginatedResult + { + internal static EnvironmentContainerResourceArmPaginatedResult DeserializeEnvironmentContainerResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentContainerResource.DeserializeEnvironmentContainerResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new EnvironmentContainerResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..5df106e53438 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of EnvironmentContainer entities. + public partial class EnvironmentContainerResourceArmPaginatedResult + { + /// Initializes a new instance of EnvironmentContainerResourceArmPaginatedResult. + internal EnvironmentContainerResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of EnvironmentContainerResourceArmPaginatedResult. + /// An array of objects of type EnvironmentContainer. + /// . + internal EnvironmentContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type EnvironmentContainer. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.Serialization.cs new file mode 100644 index 000000000000..f0942229e3bd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentImageRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DriverProgram)) + { + writer.WritePropertyName("driverProgram"); + writer.WriteStringValue(DriverProgram); + } + if (Optional.IsCollectionDefined(Assets)) + { + writer.WritePropertyName("assets"); + writer.WriteStartArray(); + foreach (var item in Assets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModelIds)) + { + writer.WritePropertyName("modelIds"); + writer.WriteStartArray(); + foreach (var item in ModelIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Models)) + { + writer.WritePropertyName("models"); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Environment)) + { + writer.WritePropertyName("environment"); + writer.WriteObjectValue(Environment); + } + if (Optional.IsDefined(EnvironmentReference)) + { + writer.WritePropertyName("environmentReference"); + writer.WriteObjectValue(EnvironmentReference); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.cs new file mode 100644 index 000000000000..db76ed3dd175 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequest.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Request to create a Docker image based on Environment. + public partial class EnvironmentImageRequest + { + /// Initializes a new instance of EnvironmentImageRequest. + public EnvironmentImageRequest() + { + Assets = new ChangeTrackingList(); + ModelIds = new ChangeTrackingList(); + Models = new ChangeTrackingList(); + } + + /// The name of the driver file. + public string DriverProgram { get; set; } + /// The list of assets. + public IList Assets { get; } + /// The list of model Ids. + public IList ModelIds { get; } + /// The list of models. + public IList Models { get; } + /// The details of the AZURE ML environment. + public ModelEnvironmentDefinition Environment { get; set; } + /// The unique identifying details of the AZURE ML environment. + public EnvironmentReference EnvironmentReference { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.Serialization.cs new file mode 100644 index 000000000000..8f9a0638d025 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentImageRequestEnvironment : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Python)) + { + writer.WritePropertyName("python"); + writer.WriteObjectValue(Python); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Docker)) + { + writer.WritePropertyName("docker"); + writer.WriteObjectValue(Docker); + } + if (Optional.IsDefined(Spark)) + { + writer.WritePropertyName("spark"); + writer.WriteObjectValue(Spark); + } + if (Optional.IsDefined(R)) + { + writer.WritePropertyName("r"); + writer.WriteObjectValue(R); + } + if (Optional.IsDefined(InferencingStackVersion)) + { + writer.WritePropertyName("inferencingStackVersion"); + writer.WriteStringValue(InferencingStackVersion); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.cs new file mode 100644 index 000000000000..c5bca29379bc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironment.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The details of the AZURE ML environment. + public partial class EnvironmentImageRequestEnvironment : ModelEnvironmentDefinition + { + /// Initializes a new instance of EnvironmentImageRequestEnvironment. + public EnvironmentImageRequestEnvironment() + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.Serialization.cs new file mode 100644 index 000000000000..a124e4201017 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentImageRequestEnvironmentReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static EnvironmentImageRequestEnvironmentReference DeserializeEnvironmentImageRequestEnvironmentReference(JsonElement element) + { + Optional name = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new EnvironmentImageRequestEnvironmentReference(name.Value, version.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.cs new file mode 100644 index 000000000000..f53c032587b8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageRequestEnvironmentReference.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The unique identifying details of the AZURE ML environment. + public partial class EnvironmentImageRequestEnvironmentReference : EnvironmentReference + { + /// Initializes a new instance of EnvironmentImageRequestEnvironmentReference. + public EnvironmentImageRequestEnvironmentReference() + { + } + + /// Initializes a new instance of EnvironmentImageRequestEnvironmentReference. + /// Name of the environment. + /// Version of the environment. + internal EnvironmentImageRequestEnvironmentReference(string name, string version) : base(name, version) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.Serialization.cs new file mode 100644 index 000000000000..693041fd10e8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentImageResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DriverProgram)) + { + writer.WritePropertyName("driverProgram"); + writer.WriteStringValue(DriverProgram); + } + if (Optional.IsCollectionDefined(Assets)) + { + writer.WritePropertyName("assets"); + writer.WriteStartArray(); + foreach (var item in Assets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ModelIds)) + { + writer.WritePropertyName("modelIds"); + writer.WriteStartArray(); + foreach (var item in ModelIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Models)) + { + writer.WritePropertyName("models"); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Environment)) + { + writer.WritePropertyName("environment"); + writer.WriteObjectValue(Environment); + } + if (Optional.IsDefined(EnvironmentReference)) + { + writer.WritePropertyName("environmentReference"); + writer.WriteObjectValue(EnvironmentReference); + } + writer.WriteEndObject(); + } + + internal static EnvironmentImageResponse DeserializeEnvironmentImageResponse(JsonElement element) + { + Optional driverProgram = default; + Optional> assets = default; + Optional> modelIds = default; + Optional> models = default; + Optional environment = default; + Optional environmentReference = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("driverProgram")) + { + driverProgram = property.Value.GetString(); + continue; + } + if (property.NameEquals("assets")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ImageAsset.DeserializeImageAsset(item)); + } + assets = array; + continue; + } + if (property.NameEquals("modelIds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + modelIds = array; + continue; + } + if (property.NameEquals("models")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Model.DeserializeModel(item)); + } + models = array; + continue; + } + if (property.NameEquals("environment")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environment = ModelEnvironmentDefinitionResponse.DeserializeModelEnvironmentDefinitionResponse(property.Value); + continue; + } + if (property.NameEquals("environmentReference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environmentReference = EnvironmentReference.DeserializeEnvironmentReference(property.Value); + continue; + } + } + return new EnvironmentImageResponse(driverProgram.Value, Optional.ToList(assets), Optional.ToList(modelIds), Optional.ToList(models), environment.Value, environmentReference.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.cs new file mode 100644 index 000000000000..aad79dfdf080 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponse.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Request to create a Docker image based on Environment. + public partial class EnvironmentImageResponse + { + /// Initializes a new instance of EnvironmentImageResponse. + public EnvironmentImageResponse() + { + Assets = new ChangeTrackingList(); + ModelIds = new ChangeTrackingList(); + Models = new ChangeTrackingList(); + } + + /// Initializes a new instance of EnvironmentImageResponse. + /// The name of the driver file. + /// The list of assets. + /// The list of model Ids. + /// The list of models. + /// The details of the AZURE ML environment. + /// The unique identifying details of the AZURE ML environment. + internal EnvironmentImageResponse(string driverProgram, IList assets, IList modelIds, IList models, ModelEnvironmentDefinitionResponse environment, EnvironmentReference environmentReference) + { + DriverProgram = driverProgram; + Assets = assets; + ModelIds = modelIds; + Models = models; + Environment = environment; + EnvironmentReference = environmentReference; + } + + /// The name of the driver file. + public string DriverProgram { get; set; } + /// The list of assets. + public IList Assets { get; } + /// The list of model Ids. + public IList ModelIds { get; } + /// The list of models. + public IList Models { get; } + /// The details of the AZURE ML environment. + public ModelEnvironmentDefinitionResponse Environment { get; set; } + /// The unique identifying details of the AZURE ML environment. + public EnvironmentReference EnvironmentReference { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.Serialization.cs new file mode 100644 index 000000000000..59bcb1244098 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentImageResponseEnvironment : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Python)) + { + writer.WritePropertyName("python"); + writer.WriteObjectValue(Python); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Docker)) + { + writer.WritePropertyName("docker"); + writer.WriteObjectValue(Docker); + } + if (Optional.IsDefined(Spark)) + { + writer.WritePropertyName("spark"); + writer.WriteObjectValue(Spark); + } + if (Optional.IsDefined(R)) + { + writer.WritePropertyName("r"); + writer.WriteObjectValue(R); + } + if (Optional.IsDefined(InferencingStackVersion)) + { + writer.WritePropertyName("inferencingStackVersion"); + writer.WriteStringValue(InferencingStackVersion); + } + writer.WriteEndObject(); + } + + internal static EnvironmentImageResponseEnvironment DeserializeEnvironmentImageResponseEnvironment(JsonElement element) + { + Optional name = default; + Optional version = default; + Optional python = default; + Optional> environmentVariables = default; + Optional docker = default; + Optional spark = default; + Optional r = default; + Optional inferencingStackVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("python")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + python = ModelPythonSection.DeserializeModelPythonSection(property.Value); + continue; + } + if (property.NameEquals("environmentVariables")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("docker")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + docker = ModelDockerSectionResponse.DeserializeModelDockerSectionResponse(property.Value); + continue; + } + if (property.NameEquals("spark")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + spark = ModelSparkSection.DeserializeModelSparkSection(property.Value); + continue; + } + if (property.NameEquals("r")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + r = RSectionResponse.DeserializeRSectionResponse(property.Value); + continue; + } + if (property.NameEquals("inferencingStackVersion")) + { + inferencingStackVersion = property.Value.GetString(); + continue; + } + } + return new EnvironmentImageResponseEnvironment(name.Value, version.Value, python.Value, Optional.ToDictionary(environmentVariables), docker.Value, spark.Value, r.Value, inferencingStackVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.cs new file mode 100644 index 000000000000..2b71c906bcb0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironment.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The details of the AZURE ML environment. + public partial class EnvironmentImageResponseEnvironment : ModelEnvironmentDefinitionResponse + { + /// Initializes a new instance of EnvironmentImageResponseEnvironment. + public EnvironmentImageResponseEnvironment() + { + } + + /// Initializes a new instance of EnvironmentImageResponseEnvironment. + /// The name of the environment. + /// The environment version. + /// Settings for a Python environment. + /// Definition of environment variables to be defined in the environment. + /// The definition of a Docker container. + /// The configuration for a Spark environment. + /// Settings for a R environment. + /// The inferencing stack version added to the image. To avoid adding an inferencing stack, do not set this value. Valid values: "latest". + internal EnvironmentImageResponseEnvironment(string name, string version, ModelPythonSection python, IDictionary environmentVariables, ModelDockerSectionResponse docker, ModelSparkSection spark, RSectionResponse r, string inferencingStackVersion) : base(name, version, python, environmentVariables, docker, spark, r, inferencingStackVersion) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.Serialization.cs new file mode 100644 index 000000000000..fbf1692a1339 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentImageResponseEnvironmentReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static EnvironmentImageResponseEnvironmentReference DeserializeEnvironmentImageResponseEnvironmentReference(JsonElement element) + { + Optional name = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new EnvironmentImageResponseEnvironmentReference(name.Value, version.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.cs new file mode 100644 index 000000000000..2ce80236f6ab --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentImageResponseEnvironmentReference.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The unique identifying details of the AZURE ML environment. + public partial class EnvironmentImageResponseEnvironmentReference : EnvironmentReference + { + /// Initializes a new instance of EnvironmentImageResponseEnvironmentReference. + public EnvironmentImageResponseEnvironmentReference() + { + } + + /// Initializes a new instance of EnvironmentImageResponseEnvironmentReference. + /// Name of the environment. + /// Version of the environment. + internal EnvironmentImageResponseEnvironmentReference(string name, string version) : base(name, version) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.Serialization.cs new file mode 100644 index 000000000000..713907f5bd9d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static EnvironmentReference DeserializeEnvironmentReference(JsonElement element) + { + Optional name = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new EnvironmentReference(name.Value, version.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.cs new file mode 100644 index 000000000000..1456e6cd2777 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentReference.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The EnvironmentReference. + public partial class EnvironmentReference + { + /// Initializes a new instance of EnvironmentReference. + public EnvironmentReference() + { + } + + /// Initializes a new instance of EnvironmentReference. + /// Name of the environment. + /// Version of the environment. + internal EnvironmentReference(string name, string version) + { + Name = name; + Version = version; + } + + /// Name of the environment. + public string Name { get; set; } + /// Version of the environment. + public string Version { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationType.cs new file mode 100644 index 000000000000..0659a2309d88 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationType.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// + /// 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" />. + /// + public readonly partial struct EnvironmentSpecificationType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public EnvironmentSpecificationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CuratedValue = "Curated"; + private const string UserCreatedValue = "UserCreated"; + + /// Curated. + public static EnvironmentSpecificationType Curated { get; } = new EnvironmentSpecificationType(CuratedValue); + /// UserCreated. + public static EnvironmentSpecificationType UserCreated { get; } = new EnvironmentSpecificationType(UserCreatedValue); + /// Determines if two values are the same. + public static bool operator ==(EnvironmentSpecificationType left, EnvironmentSpecificationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnvironmentSpecificationType left, EnvironmentSpecificationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EnvironmentSpecificationType(string value) => new EnvironmentSpecificationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnvironmentSpecificationType other && Equals(other); + /// + public bool Equals(EnvironmentSpecificationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.Serialization.cs new file mode 100644 index 000000000000..a1e9fdfdcf9c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentSpecificationVersion : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Docker)) + { + writer.WritePropertyName("docker"); + writer.WriteObjectValue(Docker); + } + if (Optional.IsDefined(CondaFile)) + { + writer.WritePropertyName("condaFile"); + writer.WriteStringValue(CondaFile); + } + if (Optional.IsDefined(DatastoreId)) + { + writer.WritePropertyName("datastoreId"); + writer.WriteStringValue(DatastoreId); + } + if (Optional.IsDefined(AssetPath)) + { + writer.WritePropertyName("assetPath"); + writer.WriteObjectValue(AssetPath); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static EnvironmentSpecificationVersion DeserializeEnvironmentSpecificationVersion(JsonElement element) + { + Optional type = default; + Optional docker = default; + Optional condaFile = default; + Optional datastoreId = default; + Optional assetPath = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + type = new EnvironmentSpecificationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("docker")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + docker = DockerSpecification.DeserializeDockerSpecification(property.Value); + continue; + } + if (property.NameEquals("condaFile")) + { + condaFile = property.Value.GetString(); + continue; + } + if (property.NameEquals("datastoreId")) + { + datastoreId = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + assetPath = AssetPath.DeserializeAssetPath(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new EnvironmentSpecificationVersion(Optional.ToNullable(type), docker.Value, condaFile.Value, datastoreId.Value, assetPath.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.cs new file mode 100644 index 000000000000..37d335900cd1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersion.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// + /// Data Transfer Object (DTO) for an Execution Environment Specification. Name and + /// + /// version should default to the AzureML-Minimal environment version tested with the + /// + /// current SDK client version as this is a main use-case. + /// + /// <see href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. + /// + public partial class EnvironmentSpecificationVersion + { + /// Initializes a new instance of EnvironmentSpecificationVersion. + public EnvironmentSpecificationVersion() + { + Tags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of EnvironmentSpecificationVersion. + /// + /// 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" />. + /// + /// Class to represent configuration settings for Docker. + /// + /// 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" />. + /// + /// The asset datastoreId. + /// Details of an AssetUri. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + internal EnvironmentSpecificationVersion(EnvironmentSpecificationType? type, DockerSpecification docker, string condaFile, string datastoreId, AssetPath assetPath, string description, IDictionary tags, IDictionary properties) + { + Type = type; + Docker = docker; + CondaFile = condaFile; + DatastoreId = datastoreId; + AssetPath = assetPath; + Description = description; + Tags = tags; + Properties = properties; + } + + /// + /// 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" />. + /// + public EnvironmentSpecificationType? Type { get; } + /// Class to represent configuration settings for Docker. + public DockerSpecification Docker { get; set; } + /// + /// 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" />. + /// + public string CondaFile { get; set; } + /// The asset datastoreId. + public string DatastoreId { get; set; } + /// Details of an AssetUri. + public AssetPath AssetPath { get; set; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + /// The asset property dictionary. + public IDictionary Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.Serialization.cs new file mode 100644 index 000000000000..1b03ff9e8704 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentSpecificationVersionResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static EnvironmentSpecificationVersionResource DeserializeEnvironmentSpecificationVersionResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + EnvironmentSpecificationVersion properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = EnvironmentSpecificationVersion.DeserializeEnvironmentSpecificationVersion(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new EnvironmentSpecificationVersionResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.cs new file mode 100644 index 000000000000..a5ce597ebba5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResource.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class EnvironmentSpecificationVersionResource + { + /// Initializes a new instance of EnvironmentSpecificationVersionResource. + /// + /// Data Transfer Object (DTO) for an Execution Environment Specification. Name and + /// + /// version should default to the AzureML-Minimal environment version tested with the + /// + /// current SDK client version as this is a main use-case. + /// + /// <see href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. + /// + /// is null. + public EnvironmentSpecificationVersionResource(EnvironmentSpecificationVersion properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of EnvironmentSpecificationVersionResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// + /// Data Transfer Object (DTO) for an Execution Environment Specification. Name and + /// + /// version should default to the AzureML-Minimal environment version tested with the + /// + /// current SDK client version as this is a main use-case. + /// + /// <see href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. + /// + /// Metadata pertaining to creation and last modification of the resource. + internal EnvironmentSpecificationVersionResource(string id, string name, string type, EnvironmentSpecificationVersion properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + /// + /// Data Transfer Object (DTO) for an Execution Environment Specification. Name and + /// + /// version should default to the AzureML-Minimal environment version tested with the + /// + /// current SDK client version as this is a main use-case. + /// + /// <see href="https://repo2docker.readthedocs.io/en/latest/specification.html" />. + /// + public EnvironmentSpecificationVersion Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..dcdebf5e4ded --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EnvironmentSpecificationVersionResourceArmPaginatedResult + { + internal static EnvironmentSpecificationVersionResourceArmPaginatedResult DeserializeEnvironmentSpecificationVersionResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSpecificationVersionResource.DeserializeEnvironmentSpecificationVersionResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new EnvironmentSpecificationVersionResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..8ea3a7c943f0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EnvironmentSpecificationVersionResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of EnvironmentSpecificationVersion entities. + public partial class EnvironmentSpecificationVersionResourceArmPaginatedResult + { + /// Initializes a new instance of EnvironmentSpecificationVersionResourceArmPaginatedResult. + internal EnvironmentSpecificationVersionResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of EnvironmentSpecificationVersionResourceArmPaginatedResult. + /// An array of objects of type EnvironmentSpecificationVersion. + /// . + internal EnvironmentSpecificationVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type EnvironmentSpecificationVersion. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.Serialization.cs new file mode 100644 index 000000000000..f3b4e0745bf8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ErrorDetail + { + internal static ErrorDetail DeserializeErrorDetail(JsonElement element) + { + string code = default; + string message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + } + return new ErrorDetail(code, message); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.cs new file mode 100644 index 000000000000..8952a20ce5b0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorDetail.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Error detail information. + public partial class ErrorDetail + { + /// Initializes a new instance of ErrorDetail. + /// Error code. + /// Error message. + /// or is null. + internal ErrorDetail(string code, string message) + { + if (code == null) + { + throw new ArgumentNullException(nameof(code)); + } + if (message == null) + { + throw new ArgumentNullException(nameof(message)); + } + + Code = code; + Message = message; + } + + /// Error code. + public string Code { get; } + /// Error message. + public string Message { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.Serialization.cs new file mode 100644 index 000000000000..bb2d87c7d956 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ErrorResponse + { + internal static ErrorResponse DeserializeErrorResponse(JsonElement element) + { + Optional code = default; + Optional message = default; + Optional> details = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorDetail.DeserializeErrorDetail(item)); + } + details = array; + continue; + } + } + return new ErrorResponse(code.Value, message.Value, Optional.ToList(details)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.cs new file mode 100644 index 000000000000..d7df3113bc61 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ErrorResponse.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Error response information. + public partial class ErrorResponse + { + /// Initializes a new instance of ErrorResponse. + internal ErrorResponse() + { + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of ErrorResponse. + /// Error code. + /// Error message. + /// An array of error detail objects. + internal ErrorResponse(string code, string message, IReadOnlyList details) + { + Code = code; + Message = message; + Details = details; + } + + /// Error code. + public string Code { get; } + /// Error message. + public string Message { get; } + /// An array of error detail objects. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrice.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrice.Serialization.cs new file mode 100644 index 000000000000..918ab4f32ed1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrice.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EstimatedVMPrice + { + internal static EstimatedVMPrice DeserializeEstimatedVMPrice(JsonElement element) + { + double retailPrice = default; + VMPriceOSType osType = default; + VMTier vmTier = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("retailPrice")) + { + retailPrice = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("osType")) + { + osType = new VMPriceOSType(property.Value.GetString()); + continue; + } + if (property.NameEquals("vmTier")) + { + vmTier = new VMTier(property.Value.GetString()); + continue; + } + } + return new EstimatedVMPrice(retailPrice, osType, vmTier); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrice.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrice.cs new file mode 100644 index 000000000000..436052bd4aff --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrice.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The estimated price info for using a VM of a particular OS type, tier, etc. + public partial class EstimatedVMPrice + { + /// Initializes a new instance of EstimatedVMPrice. + /// The price charged for using the VM. + /// Operating system type used by the VM. + /// The type of the VM. + internal EstimatedVMPrice(double retailPrice, VMPriceOSType osType, VMTier vmTier) + { + RetailPrice = retailPrice; + OsType = osType; + VmTier = vmTier; + } + + /// The price charged for using the VM. + public double RetailPrice { get; } + /// Operating system type used by the VM. + public VMPriceOSType OsType { get; } + /// The type of the VM. + public VMTier VmTier { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrices.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrices.Serialization.cs new file mode 100644 index 000000000000..72b0b6e2507a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrices.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EstimatedVMPrices + { + internal static EstimatedVMPrices DeserializeEstimatedVMPrices(JsonElement element) + { + BillingCurrency billingCurrency = default; + UnitOfMeasure unitOfMeasure = default; + IReadOnlyList values = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("billingCurrency")) + { + billingCurrency = new BillingCurrency(property.Value.GetString()); + continue; + } + if (property.NameEquals("unitOfMeasure")) + { + unitOfMeasure = new UnitOfMeasure(property.Value.GetString()); + continue; + } + if (property.NameEquals("values")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EstimatedVMPrice.DeserializeEstimatedVMPrice(item)); + } + values = array; + continue; + } + } + return new EstimatedVMPrices(billingCurrency, unitOfMeasure, values); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrices.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrices.cs new file mode 100644 index 000000000000..37ab005b7fb6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EstimatedVMPrices.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The estimated price info for using a VM. + public partial class EstimatedVMPrices + { + /// Initializes a new instance of EstimatedVMPrices. + /// Three lettered code specifying the currency of the VM price. Example: USD. + /// The unit of time measurement for the specified VM price. Example: OneHour. + /// The list of estimated prices for using a VM of a particular OS type, tier, etc. + /// is null. + internal EstimatedVMPrices(BillingCurrency billingCurrency, UnitOfMeasure unitOfMeasure, IEnumerable values) + { + if (values == null) + { + throw new ArgumentNullException(nameof(values)); + } + + BillingCurrency = billingCurrency; + UnitOfMeasure = unitOfMeasure; + Values = values.ToList(); + } + + /// Initializes a new instance of EstimatedVMPrices. + /// Three lettered code specifying the currency of the VM price. Example: USD. + /// The unit of time measurement for the specified VM price. Example: OneHour. + /// The list of estimated prices for using a VM of a particular OS type, tier, etc. + internal EstimatedVMPrices(BillingCurrency billingCurrency, UnitOfMeasure unitOfMeasure, IReadOnlyList values) + { + BillingCurrency = billingCurrency; + UnitOfMeasure = unitOfMeasure; + Values = values; + } + + /// Three lettered code specifying the currency of the VM price. Example: USD. + public BillingCurrency BillingCurrency { get; } + /// The unit of time measurement for the specified VM price. Example: OneHour. + public UnitOfMeasure UnitOfMeasure { get; } + /// The list of estimated prices for using a VM of a particular OS type, tier, etc. + public IReadOnlyList Values { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.Serialization.cs new file mode 100644 index 000000000000..83272b8e6ef7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class EvaluationConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("primaryMetricName"); + writer.WriteStringValue(PrimaryMetricName); + writer.WritePropertyName("primaryMetricGoal"); + writer.WriteStringValue(PrimaryMetricGoal.ToString()); + writer.WriteEndObject(); + } + + internal static EvaluationConfiguration DeserializeEvaluationConfiguration(JsonElement element) + { + string primaryMetricName = default; + PrimaryMetricGoal primaryMetricGoal = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("primaryMetricName")) + { + primaryMetricName = property.Value.GetString(); + continue; + } + if (property.NameEquals("primaryMetricGoal")) + { + primaryMetricGoal = new PrimaryMetricGoal(property.Value.GetString()); + continue; + } + } + return new EvaluationConfiguration(primaryMetricName, primaryMetricGoal); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.cs new file mode 100644 index 000000000000..9e9827949669 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/EvaluationConfiguration.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The EvaluationConfiguration. + public partial class EvaluationConfiguration + { + /// Initializes a new instance of EvaluationConfiguration. + /// . + /// Defines supported metric goals for hyperparameter tuning. + /// is null. + public EvaluationConfiguration(string primaryMetricName, PrimaryMetricGoal primaryMetricGoal) + { + if (primaryMetricName == null) + { + throw new ArgumentNullException(nameof(primaryMetricName)); + } + + PrimaryMetricName = primaryMetricName; + PrimaryMetricGoal = primaryMetricGoal; + } + + public string PrimaryMetricName { get; set; } + /// Defines supported metric goals for hyperparameter tuning. + public PrimaryMetricGoal PrimaryMetricGoal { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportFormatType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportFormatType.cs new file mode 100644 index 000000000000..447e2c94d09c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportFormatType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The format of exported labels. + public readonly partial struct ExportFormatType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ExportFormatType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DatasetValue = "Dataset"; + private const string CocoValue = "Coco"; + private const string CSVValue = "CSV"; + + /// Dataset. + public static ExportFormatType Dataset { get; } = new ExportFormatType(DatasetValue); + /// Coco. + public static ExportFormatType Coco { get; } = new ExportFormatType(CocoValue); + /// CSV. + public static ExportFormatType CSV { get; } = new ExportFormatType(CSVValue); + /// Determines if two values are the same. + public static bool operator ==(ExportFormatType left, ExportFormatType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExportFormatType left, ExportFormatType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ExportFormatType(string value) => new ExportFormatType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExportFormatType other && Equals(other); + /// + public bool Equals(ExportFormatType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.Serialization.cs new file mode 100644 index 000000000000..79db3c1d590d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ExportSummary + { + internal static ExportSummary DeserializeExportSummary(JsonElement element) + { + ExportFormatType format = default; + Optional exportId = default; + Optional labelingJobId = default; + Optional exportedRowCount = default; + Optional startTimeUtc = default; + Optional endTimeUtc = default; + Optional state = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("format")) + { + format = new ExportFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("exportId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + exportId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("labelingJobId")) + { + labelingJobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("exportedRowCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + exportedRowCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("startTimeUtc")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + startTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTimeUtc")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + endTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new LabelExportState(property.Value.GetString()); + continue; + } + } + return new ExportSummary(format, Optional.ToNullable(exportId), labelingJobId.Value, Optional.ToNullable(exportedRowCount), Optional.ToNullable(startTimeUtc), Optional.ToNullable(endTimeUtc), Optional.ToNullable(state)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.cs new file mode 100644 index 000000000000..686b53883fa9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummary.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ExportSummary. + public partial class ExportSummary + { + /// Initializes a new instance of ExportSummary. + internal ExportSummary() + { + } + + /// Initializes a new instance of ExportSummary. + /// The format of exported labels, also as the discriminator. + /// The unique identifier of completed Export Labels operation. + /// Name and identifier of the job containing exported labels. + /// The total number of labeled datapoints exported. + /// The time when the export was requested. + /// The time when the export was completed. + /// The state of the Export Labels operation. + internal ExportSummary(ExportFormatType format, Guid? exportId, string labelingJobId, long? exportedRowCount, DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, LabelExportState? state) + { + Format = format; + ExportId = exportId; + LabelingJobId = labelingJobId; + ExportedRowCount = exportedRowCount; + StartTimeUtc = startTimeUtc; + EndTimeUtc = endTimeUtc; + State = state; + } + + /// The format of exported labels, also as the discriminator. + internal ExportFormatType Format { get; set; } + /// The unique identifier of completed Export Labels operation. + public Guid? ExportId { get; } + /// Name and identifier of the job containing exported labels. + public string LabelingJobId { get; } + /// The total number of labeled datapoints exported. + public long? ExportedRowCount { get; } + /// The time when the export was requested. + public DateTimeOffset? StartTimeUtc { get; } + /// The time when the export was completed. + public DateTimeOffset? EndTimeUtc { get; } + /// The state of the Export Labels operation. + public LabelExportState? State { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.Serialization.cs new file mode 100644 index 000000000000..4b597c012291 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ExportSummaryResource + { + internal static ExportSummaryResource DeserializeExportSummaryResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + ExportSummary properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = ExportSummary.DeserializeExportSummary(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new ExportSummaryResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.cs new file mode 100644 index 000000000000..929c596282d0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ExportSummaryResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class ExportSummaryResource + { + /// Initializes a new instance of ExportSummaryResource. + /// . + /// is null. + internal ExportSummaryResource(ExportSummary properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of ExportSummaryResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// . + /// Metadata pertaining to creation and last modification of the resource. + internal ExportSummaryResource(string id, string name, string type, ExportSummary properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + public ExportSummary Properties { get; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.Serialization.cs new file mode 100644 index 000000000000..834284ab5fb8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class GlusterFsSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("serverAddress"); + writer.WriteStringValue(ServerAddress); + writer.WritePropertyName("volumeName"); + writer.WriteStringValue(VolumeName); + writer.WriteEndObject(); + } + + internal static GlusterFsSection DeserializeGlusterFsSection(JsonElement element) + { + string serverAddress = default; + string volumeName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serverAddress")) + { + serverAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("volumeName")) + { + volumeName = property.Value.GetString(); + continue; + } + } + return new GlusterFsSection(serverAddress, volumeName); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.cs new file mode 100644 index 000000000000..5dd2db495713 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/GlusterFsSection.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The GlusterFsSection. + public partial class GlusterFsSection + { + /// Initializes a new instance of GlusterFsSection. + /// GlusterFS server address (can be the IP address or server name). + /// GlusterFS volume name. + /// or is null. + public GlusterFsSection(string serverAddress, string volumeName) + { + if (serverAddress == null) + { + throw new ArgumentNullException(nameof(serverAddress)); + } + if (volumeName == null) + { + throw new ArgumentNullException(nameof(volumeName)); + } + + ServerAddress = serverAddress; + VolumeName = volumeName; + } + + /// GlusterFS server address (can be the IP address or server name). + public string ServerAddress { get; set; } + /// GlusterFS volume name. + public string VolumeName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.Serialization.cs new file mode 100644 index 000000000000..271e83f65199 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class HDInsight : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static HDInsight DeserializeHDInsight(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = HDInsightProperties.DeserializeHDInsightProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new HDInsight(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.cs new file mode 100644 index 000000000000..66230a5dc6b3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsight.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A HDInsight compute. + public partial class HDInsight : Compute + { + /// Initializes a new instance of HDInsight. + public HDInsight() + { + ComputeType = ComputeType.HDInsight; + } + + /// Initializes a new instance of HDInsight. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// . + internal HDInsight(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, HDInsightProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + { + Properties = properties; + ComputeType = computeType; + } + + public HDInsightProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.Serialization.cs new file mode 100644 index 000000000000..d13fed799446 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class HDInsightProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SshPort)) + { + writer.WritePropertyName("sshPort"); + writer.WriteNumberValue(SshPort.Value); + } + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"); + writer.WriteStringValue(Address); + } + if (Optional.IsDefined(AdministratorAccount)) + { + writer.WritePropertyName("administratorAccount"); + writer.WriteObjectValue(AdministratorAccount); + } + writer.WriteEndObject(); + } + + internal static HDInsightProperties DeserializeHDInsightProperties(JsonElement element) + { + Optional sshPort = default; + Optional address = default; + Optional administratorAccount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sshPort")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("address")) + { + address = property.Value.GetString(); + continue; + } + if (property.NameEquals("administratorAccount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + administratorAccount = VirtualMachineSshCredentials.DeserializeVirtualMachineSshCredentials(property.Value); + continue; + } + } + return new HDInsightProperties(Optional.ToNullable(sshPort), address.Value, administratorAccount.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.cs new file mode 100644 index 000000000000..8b35966f6b78 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/HDInsightProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The HDInsightProperties. + public partial class HDInsightProperties + { + /// Initializes a new instance of HDInsightProperties. + public HDInsightProperties() + { + } + + /// Initializes a new instance of HDInsightProperties. + /// Port open for ssh connections on the master node of the cluster. + /// Public IP address of the master node of the cluster. + /// Admin credentials for master node of the cluster. + internal HDInsightProperties(int? sshPort, string address, VirtualMachineSshCredentials administratorAccount) + { + SshPort = sshPort; + Address = address; + AdministratorAccount = administratorAccount; + } + + /// Port open for ssh connections on the master node of the cluster. + public int? SshPort { get; set; } + /// Public IP address of the master node of the cluster. + public string Address { get; set; } + /// Admin credentials for master node of the cluster. + public VirtualMachineSshCredentials AdministratorAccount { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Identity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Identity.Serialization.cs new file mode 100644 index 000000000000..f6c784d1d7e4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Identity.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Identity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type.Value.ToSerialString()); + } + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"); + writer.WriteStartObject(); + foreach (var item in UserAssignedIdentities) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static Identity DeserializeIdentity(JsonElement element) + { + Optional principalId = default; + Optional tenantId = default; + Optional type = default; + Optional> userAssignedIdentities = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("principalId")) + { + principalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId")) + { + tenantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + type = property.Value.GetString().ToResourceIdentityType(); + continue; + } + if (property.NameEquals("userAssignedIdentities")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, UserAssignedIdentity.DeserializeUserAssignedIdentity(property0.Value)); + } + userAssignedIdentities = dictionary; + continue; + } + } + return new Identity(principalId.Value, tenantId.Value, Optional.ToNullable(type), Optional.ToDictionary(userAssignedIdentities)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Identity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Identity.cs new file mode 100644 index 000000000000..2ab53ae0d9cb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Identity.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Identity for the resource. + public partial class Identity + { + /// Initializes a new instance of Identity. + public Identity() + { + UserAssignedIdentities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of Identity. + /// The principal ID of resource identity. + /// The tenant ID of resource. + /// The identity type. + /// The user assigned identities associated with the resource. + internal Identity(string principalId, string tenantId, ResourceIdentityType? type, IDictionary userAssignedIdentities) + { + PrincipalId = principalId; + TenantId = tenantId; + Type = type; + UserAssignedIdentities = userAssignedIdentities; + } + + /// The principal ID of resource identity. + public string PrincipalId { get; } + /// The tenant ID of resource. + public string TenantId { get; } + /// The identity type. + public ResourceIdentityType? Type { get; set; } + /// The user assigned identities associated with the resource. + public IDictionary UserAssignedIdentities { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.Serialization.cs new file mode 100644 index 000000000000..bcb814dd6de6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ImageAsset : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(MimeType)) + { + writer.WritePropertyName("mimeType"); + writer.WriteStringValue(MimeType); + } + if (Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"); + writer.WriteStringValue(Url); + } + if (Optional.IsDefined(Unpack)) + { + writer.WritePropertyName("unpack"); + writer.WriteBooleanValue(Unpack.Value); + } + writer.WriteEndObject(); + } + + internal static ImageAsset DeserializeImageAsset(JsonElement element) + { + Optional id = default; + Optional mimeType = default; + Optional url = default; + Optional unpack = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("mimeType")) + { + mimeType = property.Value.GetString(); + continue; + } + if (property.NameEquals("url")) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("unpack")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unpack = property.Value.GetBoolean(); + continue; + } + } + return new ImageAsset(id.Value, mimeType.Value, url.Value, Optional.ToNullable(unpack)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.cs new file mode 100644 index 000000000000..534d0bc0676e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ImageAsset.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// An Image asset. + public partial class ImageAsset + { + /// Initializes a new instance of ImageAsset. + public ImageAsset() + { + } + + /// Initializes a new instance of ImageAsset. + /// The Asset Id. + /// The mime type. + /// The Url of the Asset. + /// Whether the Asset is unpacked. + internal ImageAsset(string id, string mimeType, string url, bool? unpack) + { + Id = id; + MimeType = mimeType; + Url = url; + Unpack = unpack; + } + + /// The Asset Id. + public string Id { get; set; } + /// The mime type. + public string MimeType { get; set; } + /// The Url of the Asset. + public string Url { get; set; } + /// Whether the Asset is unpacked. + public bool? Unpack { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InnerErrorResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InnerErrorResponse.cs new file mode 100644 index 000000000000..c98b9ad42f37 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/InnerErrorResponse.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The InnerErrorResponse. + internal partial class InnerErrorResponse + { + /// Initializes a new instance of InnerErrorResponse. + internal InnerErrorResponse() + { + } + + public string Code { get; } + public InnerErrorResponse InnerError { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.Serialization.cs new file mode 100644 index 000000000000..d1fe30792c79 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.Serialization.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class JobBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("jobType"); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static JobBase DeserializeJobBase(JsonElement element) + { + if (element.TryGetProperty("jobType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Command": return CommandJob.DeserializeCommandJob(element); + case "ComputeJobBase": return ComputeJobBase.DeserializeComputeJobBase(element); + case "Labeling": return LabelingJob.DeserializeLabelingJob(element); + case "Sweep": return SweepJob.DeserializeSweepJob(element); + } + } + JobType jobType = default; + Optional interactionEndpoints = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobType")) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("interactionEndpoints")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new JobBase(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.cs new file mode 100644 index 000000000000..24b7eb5ded89 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBase.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Job base definition. + public partial class JobBase + { + /// Initializes a new instance of JobBase. + public JobBase() + { + Tags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of JobBase. + /// Specifies the type of job. + /// + /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. + /// + /// For local jobs, a job endpoint will have a value of FileStreamObject. + /// + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + internal JobBase(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties) + { + JobType = jobType; + InteractionEndpoints = interactionEndpoints; + Description = description; + Tags = tags; + Properties = properties; + } + + /// Specifies the type of job. + internal JobType JobType { get; set; } + /// + /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. + /// + /// For local jobs, a job endpoint will have a value of FileStreamObject. + /// + public JobBaseInteractionEndpoints InteractionEndpoints { get; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + /// The asset property dictionary. + public IDictionary Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.Serialization.cs new file mode 100644 index 000000000000..4bf8c39be300 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class JobBaseInteractionEndpoints + { + internal static JobBaseInteractionEndpoints DeserializeJobBaseInteractionEndpoints(JsonElement element) + { + Optional tracking = default; + Optional studio = default; + Optional grafana = default; + Optional tensorboard = default; + Optional local = default; + Optional localRequest = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Tracking")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + tracking = property.Value.GetObject(); + continue; + } + if (property.NameEquals("Studio")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + studio = property.Value.GetObject(); + continue; + } + if (property.NameEquals("Grafana")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + grafana = property.Value.GetObject(); + continue; + } + if (property.NameEquals("Tensorboard")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + tensorboard = property.Value.GetObject(); + continue; + } + if (property.NameEquals("Local")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + local = property.Value.GetObject(); + continue; + } + if (property.NameEquals("LocalRequest")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + localRequest = property.Value.GetObject(); + continue; + } + } + return new JobBaseInteractionEndpoints(tracking.Value, studio.Value, grafana.Value, tensorboard.Value, local.Value, localRequest.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.cs new file mode 100644 index 000000000000..c43bee00b6ba --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseInteractionEndpoints.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// + /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. + /// + /// For local jobs, a job endpoint will have a value of FileStreamObject. + /// + public partial class JobBaseInteractionEndpoints + { + /// Initializes a new instance of JobBaseInteractionEndpoints. + internal JobBaseInteractionEndpoints() + { + } + + /// Initializes a new instance of JobBaseInteractionEndpoints. + /// Any object. + /// Any object. + /// Any object. + /// Any object. + /// Any object. + /// Any object. + internal JobBaseInteractionEndpoints(object tracking, object studio, object grafana, object tensorboard, object local, object localRequest) + { + Tracking = tracking; + Studio = studio; + Grafana = grafana; + Tensorboard = tensorboard; + Local = local; + LocalRequest = localRequest; + } + + /// Any object. + public object Tracking { get; } + /// Any object. + public object Studio { get; } + /// Any object. + public object Grafana { get; } + /// Any object. + public object Tensorboard { get; } + /// Any object. + public object Local { get; } + /// Any object. + public object LocalRequest { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.Serialization.cs new file mode 100644 index 000000000000..ba1702736064 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class JobBaseResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static JobBaseResource DeserializeJobBaseResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + JobBase properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = JobBase.DeserializeJobBase(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new JobBaseResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.cs new file mode 100644 index 000000000000..e5a5d008bead --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResource.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class JobBaseResource + { + /// Initializes a new instance of JobBaseResource. + /// Job base definition. + /// is null. + public JobBaseResource(JobBase properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of JobBaseResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// Job base definition. + /// Metadata pertaining to creation and last modification of the resource. + internal JobBaseResource(string id, string name, string type, JobBase properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + /// Job base definition. + public JobBase Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..581ee5b75f8f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class JobBaseResourceArmPaginatedResult + { + internal static JobBaseResourceArmPaginatedResult DeserializeJobBaseResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JobBaseResource.DeserializeJobBaseResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new JobBaseResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..a3595350ea1f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of JobBase entities. + public partial class JobBaseResourceArmPaginatedResult + { + /// Initializes a new instance of JobBaseResourceArmPaginatedResult. + internal JobBaseResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of JobBaseResourceArmPaginatedResult. + /// An array of objects of type JobBase. + /// . + internal JobBaseResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type JobBase. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.Serialization.cs new file mode 100644 index 000000000000..4d2f9a49f67d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class JobOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static JobOutput DeserializeJobOutput(JsonElement element) + { + Optional datastoreId = default; + Optional path = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("datastoreId")) + { + datastoreId = property.Value.GetString(); + continue; + } + if (property.NameEquals("path")) + { + path = property.Value.GetString(); + continue; + } + } + return new JobOutput(datastoreId.Value, path.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.cs new file mode 100644 index 000000000000..1d2146781fef --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobOutput.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The JobOutput. + public partial class JobOutput + { + /// Initializes a new instance of JobOutput. + public JobOutput() + { + } + + /// Initializes a new instance of JobOutput. + /// 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. + /// Path within the datastore to the job logs and artifacts. + internal JobOutput(string datastoreId, string path) + { + DatastoreId = datastoreId; + Path = path; + } + + /// 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. + public string DatastoreId { get; } + /// Path within the datastore to the job logs and artifacts. + public string Path { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobStatus.cs new file mode 100644 index 000000000000..7989b8356001 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobStatus.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Status of the job. + public readonly partial struct JobStatus : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public JobStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string StartingValue = "Starting"; + private const string ProvisioningValue = "Provisioning"; + private const string PreparingValue = "Preparing"; + private const string QueuedValue = "Queued"; + private const string RunningValue = "Running"; + private const string FinalizingValue = "Finalizing"; + private const string CancelRequestedValue = "CancelRequested"; + private const string CompletedValue = "Completed"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string NotRespondingValue = "NotResponding"; + private const string PausedValue = "Paused"; + + /// NotStarted. + public static JobStatus NotStarted { get; } = new JobStatus(NotStartedValue); + /// Starting. + public static JobStatus Starting { get; } = new JobStatus(StartingValue); + /// Provisioning. + public static JobStatus Provisioning { get; } = new JobStatus(ProvisioningValue); + /// Preparing. + public static JobStatus Preparing { get; } = new JobStatus(PreparingValue); + /// Queued. + public static JobStatus Queued { get; } = new JobStatus(QueuedValue); + /// Running. + public static JobStatus Running { get; } = new JobStatus(RunningValue); + /// Finalizing. + public static JobStatus Finalizing { get; } = new JobStatus(FinalizingValue); + /// CancelRequested. + public static JobStatus CancelRequested { get; } = new JobStatus(CancelRequestedValue); + /// Completed. + public static JobStatus Completed { get; } = new JobStatus(CompletedValue); + /// Failed. + public static JobStatus Failed { get; } = new JobStatus(FailedValue); + /// Canceled. + public static JobStatus Canceled { get; } = new JobStatus(CanceledValue); + /// NotResponding. + public static JobStatus NotResponding { get; } = new JobStatus(NotRespondingValue); + /// Paused. + public static JobStatus Paused { get; } = new JobStatus(PausedValue); + /// Determines if two values are the same. + public static bool operator ==(JobStatus left, JobStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobStatus left, JobStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator JobStatus(string value) => new JobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobStatus other && Equals(other); + /// + public bool Equals(JobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobType.cs new file mode 100644 index 000000000000..f938c39a19ff --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/JobType.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Specifies the type of job. + public readonly partial struct JobType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public JobType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CommandValue = "Command"; + private const string SweepValue = "Sweep"; + private const string LabelingValue = "Labeling"; + private const string PipelineValue = "Pipeline"; + private const string DataValue = "Data"; + private const string AutoMLValue = "AutoML"; + + /// Command. + public static JobType Command { get; } = new JobType(CommandValue); + /// Sweep. + public static JobType Sweep { get; } = new JobType(SweepValue); + /// Labeling. + public static JobType Labeling { get; } = new JobType(LabelingValue); + /// Pipeline. + public static JobType Pipeline { get; } = new JobType(PipelineValue); + /// Data. + public static JobType Data { get; } = new JobType(DataValue); + /// AutoML. + public static JobType AutoML { get; } = new JobType(AutoMLValue); + /// Determines if two values are the same. + public static bool operator ==(JobType left, JobType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobType left, JobType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator JobType(string value) => new JobType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobType other && Equals(other); + /// + public bool Equals(JobType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KeyVaultProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KeyVaultProperties.Serialization.cs new file mode 100644 index 000000000000..5e7cc4412621 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KeyVaultProperties.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class KeyVaultProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("keyVaultArmId"); + writer.WriteStringValue(KeyVaultArmId); + writer.WritePropertyName("keyIdentifier"); + writer.WriteStringValue(KeyIdentifier); + if (Optional.IsDefined(IdentityClientId)) + { + writer.WritePropertyName("identityClientId"); + writer.WriteStringValue(IdentityClientId); + } + writer.WriteEndObject(); + } + + internal static KeyVaultProperties DeserializeKeyVaultProperties(JsonElement element) + { + string keyVaultArmId = default; + string keyIdentifier = default; + Optional identityClientId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultArmId")) + { + keyVaultArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyIdentifier")) + { + keyIdentifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("identityClientId")) + { + identityClientId = property.Value.GetString(); + continue; + } + } + return new KeyVaultProperties(keyVaultArmId, keyIdentifier, identityClientId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KeyVaultProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KeyVaultProperties.cs new file mode 100644 index 000000000000..c6227ecaf884 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/KeyVaultProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The KeyVaultProperties. + public partial class KeyVaultProperties + { + /// Initializes a new instance of KeyVaultProperties. + /// The ArmId of the keyVault where the customer owned encryption key is present. + /// Key vault uri to access the encryption key. + /// or is null. + public KeyVaultProperties(string keyVaultArmId, string keyIdentifier) + { + if (keyVaultArmId == null) + { + throw new ArgumentNullException(nameof(keyVaultArmId)); + } + if (keyIdentifier == null) + { + throw new ArgumentNullException(nameof(keyIdentifier)); + } + + KeyVaultArmId = keyVaultArmId; + KeyIdentifier = keyIdentifier; + } + + /// Initializes a new instance of KeyVaultProperties. + /// The ArmId of the keyVault where the customer owned encryption key is present. + /// Key vault uri to access the encryption key. + /// For future use - The client id of the identity which will be used to access key vault. + internal KeyVaultProperties(string keyVaultArmId, string keyIdentifier, string identityClientId) + { + KeyVaultArmId = keyVaultArmId; + KeyIdentifier = keyIdentifier; + IdentityClientId = identityClientId; + } + + /// The ArmId of the keyVault where the customer owned encryption key is present. + public string KeyVaultArmId { get; set; } + /// Key vault uri to access the encryption key. + public string KeyIdentifier { get; set; } + /// For future use - The client id of the identity which will be used to access key vault. + public string IdentityClientId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.Serialization.cs new file mode 100644 index 000000000000..8639f75f12be --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LabelCategory : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(AllowMultiSelect)) + { + writer.WritePropertyName("allowMultiSelect"); + writer.WriteBooleanValue(AllowMultiSelect.Value); + } + if (Optional.IsCollectionDefined(Classes)) + { + writer.WritePropertyName("classes"); + writer.WriteStartObject(); + foreach (var item in Classes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static LabelCategory DeserializeLabelCategory(JsonElement element) + { + Optional displayName = default; + Optional allowMultiSelect = default; + Optional> classes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName")) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowMultiSelect")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + allowMultiSelect = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("classes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, LabelClass.DeserializeLabelClass(property0.Value)); + } + classes = dictionary; + continue; + } + } + return new LabelCategory(displayName.Value, Optional.ToNullable(allowMultiSelect), Optional.ToDictionary(classes)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.cs new file mode 100644 index 000000000000..579aa1a10736 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelCategory.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Label category definition. + public partial class LabelCategory + { + /// Initializes a new instance of LabelCategory. + public LabelCategory() + { + Classes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of LabelCategory. + /// Display name of the label category. + /// Indicates whether it is allowed to select multiple classes in this category. + /// Dictionary of label classes in this category. + internal LabelCategory(string displayName, bool? allowMultiSelect, IDictionary classes) + { + DisplayName = displayName; + AllowMultiSelect = allowMultiSelect; + Classes = classes; + } + + /// Display name of the label category. + public string DisplayName { get; set; } + /// Indicates whether it is allowed to select multiple classes in this category. + public bool? AllowMultiSelect { get; set; } + /// Dictionary of label classes in this category. + public IDictionary Classes { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.Serialization.cs new file mode 100644 index 000000000000..9905282b74b1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LabelClass : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsCollectionDefined(Subclasses)) + { + writer.WritePropertyName("subclasses"); + writer.WriteStartObject(); + foreach (var item in Subclasses) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static LabelClass DeserializeLabelClass(JsonElement element) + { + Optional displayName = default; + Optional> subclasses = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName")) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("subclasses")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DeserializeLabelClass(property0.Value)); + } + subclasses = dictionary; + continue; + } + } + return new LabelClass(displayName.Value, Optional.ToDictionary(subclasses)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.cs new file mode 100644 index 000000000000..3191b0efd4db --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelClass.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Label class definition. + public partial class LabelClass + { + /// Initializes a new instance of LabelClass. + public LabelClass() + { + Subclasses = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of LabelClass. + /// Display name of the label class. + /// Dictionary of subclasses of the label class. + internal LabelClass(string displayName, IDictionary subclasses) + { + DisplayName = displayName; + Subclasses = subclasses; + } + + /// Display name of the label class. + public string DisplayName { get; set; } + /// Dictionary of subclasses of the label class. + public IDictionary Subclasses { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelExportState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelExportState.cs new file mode 100644 index 000000000000..553aaafcde4f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelExportState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The state of the Export Labels operation. + public readonly partial struct LabelExportState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public LabelExportState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RequestedValue = "Requested"; + private const string RunningValue = "Running"; + private const string FailedValue = "Failed"; + private const string CompletedValue = "Completed"; + + /// Requested. + public static LabelExportState Requested { get; } = new LabelExportState(RequestedValue); + /// Running. + public static LabelExportState Running { get; } = new LabelExportState(RunningValue); + /// Failed. + public static LabelExportState Failed { get; } = new LabelExportState(FailedValue); + /// Completed. + public static LabelExportState Completed { get; } = new LabelExportState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(LabelExportState left, LabelExportState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LabelExportState left, LabelExportState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LabelExportState(string value) => new LabelExportState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LabelExportState other && Equals(other); + /// + public bool Equals(LabelExportState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.Serialization.cs new file mode 100644 index 000000000000..b4818bb36bcb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LabelingDatasetConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AssetName)) + { + writer.WritePropertyName("assetName"); + writer.WriteStringValue(AssetName); + } + if (Optional.IsDefined(IncrementalDatasetRefreshEnabled)) + { + writer.WritePropertyName("incrementalDatasetRefreshEnabled"); + writer.WriteBooleanValue(IncrementalDatasetRefreshEnabled.Value); + } + if (Optional.IsDefined(DatasetVersion)) + { + writer.WritePropertyName("datasetVersion"); + writer.WriteStringValue(DatasetVersion); + } + writer.WriteEndObject(); + } + + internal static LabelingDatasetConfiguration DeserializeLabelingDatasetConfiguration(JsonElement element) + { + Optional assetName = default; + Optional incrementalDatasetRefreshEnabled = default; + Optional datasetVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assetName")) + { + assetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("incrementalDatasetRefreshEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + incrementalDatasetRefreshEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("datasetVersion")) + { + datasetVersion = property.Value.GetString(); + continue; + } + } + return new LabelingDatasetConfiguration(assetName.Value, Optional.ToNullable(incrementalDatasetRefreshEnabled), datasetVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.cs new file mode 100644 index 000000000000..4a030fa99392 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingDatasetConfiguration.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Labeling dataset configuration definition. + public partial class LabelingDatasetConfiguration + { + /// Initializes a new instance of LabelingDatasetConfiguration. + public LabelingDatasetConfiguration() + { + } + + /// Initializes a new instance of LabelingDatasetConfiguration. + /// Name of the data asset to perform labeling. + /// Indicates whether to enable incremental dataset refresh. + /// AML dataset version. + internal LabelingDatasetConfiguration(string assetName, bool? incrementalDatasetRefreshEnabled, string datasetVersion) + { + AssetName = assetName; + IncrementalDatasetRefreshEnabled = incrementalDatasetRefreshEnabled; + DatasetVersion = datasetVersion; + } + + /// Name of the data asset to perform labeling. + public string AssetName { get; set; } + /// Indicates whether to enable incremental dataset refresh. + public bool? IncrementalDatasetRefreshEnabled { get; set; } + /// AML dataset version. + public string DatasetVersion { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.Serialization.cs new file mode 100644 index 000000000000..85fe8a54a002 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.Serialization.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LabelingJob : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(LabelCategories)) + { + writer.WritePropertyName("labelCategories"); + writer.WriteStartObject(); + foreach (var item in LabelCategories) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(JobInstructions)) + { + writer.WritePropertyName("jobInstructions"); + writer.WriteObjectValue(JobInstructions); + } + if (Optional.IsDefined(DatasetConfiguration)) + { + writer.WritePropertyName("datasetConfiguration"); + writer.WriteObjectValue(DatasetConfiguration); + } + if (Optional.IsDefined(MlAssistConfiguration)) + { + writer.WritePropertyName("mlAssistConfiguration"); + writer.WriteObjectValue(MlAssistConfiguration); + } + if (Optional.IsDefined(LabelingJobMediaProperties)) + { + writer.WritePropertyName("labelingJobMediaProperties"); + writer.WriteObjectValue(LabelingJobMediaProperties); + } + if (Optional.IsDefined(ProjectId)) + { + writer.WritePropertyName("projectId"); + writer.WriteStringValue(ProjectId.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ProgressMetrics)) + { + writer.WritePropertyName("progressMetrics"); + writer.WriteObjectValue(ProgressMetrics); + } + if (Optional.IsCollectionDefined(StatusMessages)) + { + writer.WritePropertyName("statusMessages"); + writer.WriteStartArray(); + foreach (var item in StatusMessages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(CreatedTimeUtc)) + { + writer.WritePropertyName("createdTimeUtc"); + writer.WriteStringValue(CreatedTimeUtc.Value, "O"); + } + writer.WritePropertyName("jobType"); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static LabelingJob DeserializeLabelingJob(JsonElement element) + { + Optional> labelCategories = default; + Optional jobInstructions = default; + Optional datasetConfiguration = default; + Optional mlAssistConfiguration = default; + Optional labelingJobMediaProperties = default; + Optional projectId = default; + Optional status = default; + Optional progressMetrics = default; + Optional> statusMessages = default; + Optional createdTimeUtc = default; + JobType jobType = default; + Optional interactionEndpoints = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("labelCategories")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, LabelCategory.DeserializeLabelCategory(property0.Value)); + } + labelCategories = dictionary; + continue; + } + if (property.NameEquals("jobInstructions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + jobInstructions = LabelingJobInstructions.DeserializeLabelingJobInstructions(property.Value); + continue; + } + if (property.NameEquals("datasetConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + datasetConfiguration = LabelingDatasetConfiguration.DeserializeLabelingDatasetConfiguration(property.Value); + continue; + } + if (property.NameEquals("mlAssistConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mlAssistConfiguration = MLAssistConfiguration.DeserializeMLAssistConfiguration(property.Value); + continue; + } + if (property.NameEquals("labelingJobMediaProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + labelingJobMediaProperties = LabelingJobMediaProperties.DeserializeLabelingJobMediaProperties(property.Value); + continue; + } + if (property.NameEquals("projectId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + projectId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("progressMetrics")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + progressMetrics = ProgressMetrics.DeserializeProgressMetrics(property.Value); + continue; + } + if (property.NameEquals("statusMessages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StatusMessage.DeserializeStatusMessage(item)); + } + statusMessages = array; + continue; + } + if (property.NameEquals("createdTimeUtc")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("jobType")) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("interactionEndpoints")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new LabelingJob(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties), Optional.ToDictionary(labelCategories), jobInstructions.Value, datasetConfiguration.Value, mlAssistConfiguration.Value, labelingJobMediaProperties.Value, Optional.ToNullable(projectId), Optional.ToNullable(status), progressMetrics.Value, Optional.ToList(statusMessages), Optional.ToNullable(createdTimeUtc)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.cs new file mode 100644 index 000000000000..d69e82d31aaf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJob.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Labeling job definition. + public partial class LabelingJob : JobBase + { + /// Initializes a new instance of LabelingJob. + public LabelingJob() + { + LabelCategories = new ChangeTrackingDictionary(); + StatusMessages = new ChangeTrackingList(); + JobType = JobType.Labeling; + } + + /// Initializes a new instance of LabelingJob. + /// Specifies the type of job. + /// + /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. + /// + /// For local jobs, a job endpoint will have a value of FileStreamObject. + /// + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Label categories of the job. + /// Instructions for labeling job. + /// Labeling dataset configuration definition. + /// Labeling MLAssist configuration definition. + /// Properties of a labeling job. + /// Internal id of the job(Previously called project). + /// Status of the job. + /// Progress metrics definition. + /// Status messages of the job. + /// Created time of the job in UTC timezone. + internal LabelingJob(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties, IDictionary labelCategories, LabelingJobInstructions jobInstructions, LabelingDatasetConfiguration datasetConfiguration, MLAssistConfiguration mlAssistConfiguration, LabelingJobMediaProperties labelingJobMediaProperties, Guid? projectId, JobStatus? status, ProgressMetrics progressMetrics, IList statusMessages, DateTimeOffset? createdTimeUtc) : base(jobType, interactionEndpoints, description, tags, properties) + { + LabelCategories = labelCategories; + JobInstructions = jobInstructions; + DatasetConfiguration = datasetConfiguration; + MlAssistConfiguration = mlAssistConfiguration; + LabelingJobMediaProperties = labelingJobMediaProperties; + ProjectId = projectId; + Status = status; + ProgressMetrics = progressMetrics; + StatusMessages = statusMessages; + CreatedTimeUtc = createdTimeUtc; + JobType = jobType; + } + + /// Label categories of the job. + public IDictionary LabelCategories { get; } + /// Instructions for labeling job. + public LabelingJobInstructions JobInstructions { get; set; } + /// Labeling dataset configuration definition. + public LabelingDatasetConfiguration DatasetConfiguration { get; set; } + /// Labeling MLAssist configuration definition. + public MLAssistConfiguration MlAssistConfiguration { get; set; } + /// Properties of a labeling job. + public LabelingJobMediaProperties LabelingJobMediaProperties { get; set; } + /// Internal id of the job(Previously called project). + public Guid? ProjectId { get; set; } + /// Status of the job. + public JobStatus? Status { get; set; } + /// Progress metrics definition. + public ProgressMetrics ProgressMetrics { get; set; } + /// Status messages of the job. + public IList StatusMessages { get; } + /// Created time of the job in UTC timezone. + public DateTimeOffset? CreatedTimeUtc { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.Serialization.cs new file mode 100644 index 000000000000..a438b1c12f89 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LabelingJobInstructions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri); + } + writer.WriteEndObject(); + } + + internal static LabelingJobInstructions DeserializeLabelingJobInstructions(JsonElement element) + { + Optional uri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uri")) + { + uri = property.Value.GetString(); + continue; + } + } + return new LabelingJobInstructions(uri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.cs new file mode 100644 index 000000000000..1f1efe981d09 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobInstructions.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Instructions for labeling job. + public partial class LabelingJobInstructions + { + /// Initializes a new instance of LabelingJobInstructions. + public LabelingJobInstructions() + { + } + + /// Initializes a new instance of LabelingJobInstructions. + /// The link to a page with detailed labeling instructions for labelers. + internal LabelingJobInstructions(string uri) + { + Uri = uri; + } + + /// The link to a page with detailed labeling instructions for labelers. + public string Uri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs new file mode 100644 index 000000000000..3b9437c7d842 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LabelingJobMediaProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("mediaType"); + writer.WriteStringValue(MediaType.ToString()); + writer.WriteEndObject(); + } + + internal static LabelingJobMediaProperties DeserializeLabelingJobMediaProperties(JsonElement element) + { + MediaType mediaType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mediaType")) + { + mediaType = new MediaType(property.Value.GetString()); + continue; + } + } + return new LabelingJobMediaProperties(mediaType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.cs new file mode 100644 index 000000000000..123a87b99747 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobMediaProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Properties of a labeling job. + public partial class LabelingJobMediaProperties + { + /// Initializes a new instance of LabelingJobMediaProperties. + public LabelingJobMediaProperties() + { + } + + /// Initializes a new instance of LabelingJobMediaProperties. + /// Media type of the job. + internal LabelingJobMediaProperties(MediaType mediaType) + { + MediaType = mediaType; + } + + /// Media type of the job. + internal MediaType MediaType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.Serialization.cs new file mode 100644 index 000000000000..ba685ab21f50 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LabelingJobResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static LabelingJobResource DeserializeLabelingJobResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + LabelingJob properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = LabelingJob.DeserializeLabelingJob(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new LabelingJobResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.cs new file mode 100644 index 000000000000..dd33ed8da2e6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResource.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class LabelingJobResource + { + /// Initializes a new instance of LabelingJobResource. + /// Labeling job definition. + /// is null. + public LabelingJobResource(LabelingJob properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of LabelingJobResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// Labeling job definition. + /// Metadata pertaining to creation and last modification of the resource. + internal LabelingJobResource(string id, string name, string type, LabelingJob properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + /// Labeling job definition. + public LabelingJob Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..676b86137583 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LabelingJobResourceArmPaginatedResult + { + internal static LabelingJobResourceArmPaginatedResult DeserializeLabelingJobResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LabelingJobResource.DeserializeLabelingJobResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new LabelingJobResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..22ca68f696c4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LabelingJobResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of LabelingJob entities. + public partial class LabelingJobResourceArmPaginatedResult + { + /// Initializes a new instance of LabelingJobResourceArmPaginatedResult. + internal LabelingJobResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of LabelingJobResourceArmPaginatedResult. + /// An array of objects of type LabelingJob. + /// . + internal LabelingJobResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type LabelingJob. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.Serialization.cs new file mode 100644 index 000000000000..d90126c99d6b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LinkedInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(LinkedId)) + { + writer.WritePropertyName("linkedId"); + writer.WriteStringValue(LinkedId); + } + if (Optional.IsDefined(LinkedResourceName)) + { + writer.WritePropertyName("linkedResourceName"); + writer.WriteStringValue(LinkedResourceName); + } + if (Optional.IsDefined(Origin)) + { + writer.WritePropertyName("origin"); + writer.WriteStringValue(Origin.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static LinkedInfo DeserializeLinkedInfo(JsonElement element) + { + Optional linkedId = default; + Optional linkedResourceName = default; + Optional origin = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedId")) + { + linkedId = property.Value.GetString(); + continue; + } + if (property.NameEquals("linkedResourceName")) + { + linkedResourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("origin")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + origin = new OriginType(property.Value.GetString()); + continue; + } + } + return new LinkedInfo(linkedId.Value, linkedResourceName.Value, Optional.ToNullable(origin)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.cs new file mode 100644 index 000000000000..f289c9b72717 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedInfo.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The LinkedInfo. + public partial class LinkedInfo + { + /// Initializes a new instance of LinkedInfo. + public LinkedInfo() + { + } + + /// Initializes a new instance of LinkedInfo. + /// Linked service ID. + /// Linked service resource name. + /// Type of the linked service. + internal LinkedInfo(string linkedId, string linkedResourceName, OriginType? origin) + { + LinkedId = linkedId; + LinkedResourceName = linkedResourceName; + Origin = origin; + } + + /// Linked service ID. + public string LinkedId { get; set; } + /// Linked service resource name. + public string LinkedResourceName { get; set; } + /// Type of the linked service. + public OriginType? Origin { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.Serialization.cs new file mode 100644 index 000000000000..f47ba27b993b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LinkedServiceList + { + internal static LinkedServiceList DeserializeLinkedServiceList(JsonElement element) + { + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(LinkedServiceResponse.DeserializeLinkedServiceResponse(item)); + } + value = array; + continue; + } + } + return new LinkedServiceList(Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.cs new file mode 100644 index 000000000000..05ea3d1195ff --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceList.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// List response of linked service. + public partial class LinkedServiceList + { + /// Initializes a new instance of LinkedServiceList. + internal LinkedServiceList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of LinkedServiceList. + /// Array of linked service. + internal LinkedServiceList(IReadOnlyList value) + { + Value = value; + } + + /// Array of linked service. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.Serialization.cs new file mode 100644 index 000000000000..33c133a71301 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LinkedServiceProps : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("linkedServiceResourceId"); + writer.WriteStringValue(LinkedServiceResourceId); + if (Optional.IsDefined(LinkType)) + { + writer.WritePropertyName("linkType"); + writer.WriteStringValue(LinkType); + } + if (Optional.IsDefined(CreatedTime)) + { + writer.WritePropertyName("createdTime"); + writer.WriteStringValue(CreatedTime.Value, "O"); + } + if (Optional.IsDefined(ModifiedTime)) + { + writer.WritePropertyName("modifiedTime"); + writer.WriteStringValue(ModifiedTime.Value, "O"); + } + writer.WriteEndObject(); + } + + internal static LinkedServiceProps DeserializeLinkedServiceProps(JsonElement element) + { + string linkedServiceResourceId = default; + Optional linkType = default; + Optional createdTime = default; + Optional modifiedTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("linkedServiceResourceId")) + { + linkedServiceResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("linkType")) + { + linkType = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new LinkedServiceProps(linkedServiceResourceId, linkType.Value, Optional.ToNullable(createdTime), Optional.ToNullable(modifiedTime)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.cs new file mode 100644 index 000000000000..463e5e7a85b0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceProps.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// LinkedService specific properties. + public partial class LinkedServiceProps + { + /// Initializes a new instance of LinkedServiceProps. + /// ResourceId of the link target of the linked service. + /// is null. + public LinkedServiceProps(string linkedServiceResourceId) + { + if (linkedServiceResourceId == null) + { + throw new ArgumentNullException(nameof(linkedServiceResourceId)); + } + + LinkedServiceResourceId = linkedServiceResourceId; + LinkType = "Synapse"; + } + + /// Initializes a new instance of LinkedServiceProps. + /// ResourceId of the link target of the linked service. + /// Type of the link target. + /// The creation time of the linked service. + /// The last modified time of the linked service. + internal LinkedServiceProps(string linkedServiceResourceId, string linkType, DateTimeOffset? createdTime, DateTimeOffset? modifiedTime) + { + LinkedServiceResourceId = linkedServiceResourceId; + LinkType = linkType; + CreatedTime = createdTime; + ModifiedTime = modifiedTime; + } + + /// ResourceId of the link target of the linked service. + public string LinkedServiceResourceId { get; set; } + /// Type of the link target. + public string LinkType { get; set; } + /// The creation time of the linked service. + public DateTimeOffset? CreatedTime { get; set; } + /// The last modified time of the linked service. + public DateTimeOffset? ModifiedTime { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.Serialization.cs new file mode 100644 index 000000000000..2cb260b0730e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LinkedServiceRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.cs new file mode 100644 index 000000000000..e21e549790a0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceRequest.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// object used for creating linked service. + public partial class LinkedServiceRequest + { + /// Initializes a new instance of LinkedServiceRequest. + public LinkedServiceRequest() + { + } + + /// Friendly name of the linked service. + public string Name { get; set; } + /// location of the linked service. + public string Location { get; set; } + /// Identity for the resource. + public Identity Identity { get; set; } + /// LinkedService specific properties. + public LinkedServiceProps Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.Serialization.cs new file mode 100644 index 000000000000..95fe1e1e88f4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.Serialization.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LinkedServiceResponse + { + internal static LinkedServiceResponse DeserializeLinkedServiceResponse(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + Optional location = default; + Optional identity = default; + Optional properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = Identity.DeserializeIdentity(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = LinkedServiceProps.DeserializeLinkedServiceProps(property.Value); + continue; + } + } + return new LinkedServiceResponse(id.Value, name.Value, type.Value, location.Value, identity.Value, properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.cs new file mode 100644 index 000000000000..02d96badb282 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LinkedServiceResponse.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Linked service. + public partial class LinkedServiceResponse + { + /// Initializes a new instance of LinkedServiceResponse. + internal LinkedServiceResponse() + { + } + + /// Initializes a new instance of LinkedServiceResponse. + /// ResourceId of the link of the linked service. + /// Friendly name of the linked service. + /// Resource type of linked service. + /// location of the linked service. + /// Identity for the resource. + /// LinkedService specific properties. + internal LinkedServiceResponse(string id, string name, string type, string location, Identity identity, LinkedServiceProps properties) + { + Id = id; + Name = name; + Type = type; + Location = location; + Identity = identity; + Properties = properties; + } + + /// ResourceId of the link of the linked service. + public string Id { get; } + /// Friendly name of the linked service. + public string Name { get; } + /// Resource type of linked service. + public string Type { get; } + /// location of the linked service. + public string Location { get; } + /// Identity for the resource. + public Identity Identity { get; } + /// LinkedService specific properties. + public LinkedServiceProps Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListAmlUserFeatureResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListAmlUserFeatureResult.Serialization.cs new file mode 100644 index 000000000000..aed720dd45bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListAmlUserFeatureResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ListAmlUserFeatureResult + { + internal static ListAmlUserFeatureResult DeserializeListAmlUserFeatureResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AmlUserFeature.DeserializeAmlUserFeature(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ListAmlUserFeatureResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListAmlUserFeatureResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListAmlUserFeatureResult.cs new file mode 100644 index 000000000000..6a87ed189b0e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListAmlUserFeatureResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The List Aml user feature operation response. + public partial class ListAmlUserFeatureResult + { + /// Initializes a new instance of ListAmlUserFeatureResult. + internal ListAmlUserFeatureResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ListAmlUserFeatureResult. + /// The list of AML user facing features. + /// The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information. + internal ListAmlUserFeatureResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of AML user facing features. + public IReadOnlyList Value { get; } + /// The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListNotebookKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListNotebookKeysResult.Serialization.cs new file mode 100644 index 000000000000..92335890e20b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListNotebookKeysResult.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ListNotebookKeysResult + { + internal static ListNotebookKeysResult DeserializeListNotebookKeysResult(JsonElement element) + { + Optional primaryAccessKey = default; + Optional secondaryAccessKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("primaryAccessKey")) + { + primaryAccessKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryAccessKey")) + { + secondaryAccessKey = property.Value.GetString(); + continue; + } + } + return new ListNotebookKeysResult(primaryAccessKey.Value, secondaryAccessKey.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListNotebookKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListNotebookKeysResult.cs new file mode 100644 index 000000000000..84bdc792eee0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListNotebookKeysResult.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ListNotebookKeysResult. + public partial class ListNotebookKeysResult + { + /// Initializes a new instance of ListNotebookKeysResult. + internal ListNotebookKeysResult() + { + } + + /// Initializes a new instance of ListNotebookKeysResult. + /// . + /// . + internal ListNotebookKeysResult(string primaryAccessKey, string secondaryAccessKey) + { + PrimaryAccessKey = primaryAccessKey; + SecondaryAccessKey = secondaryAccessKey; + } + + public string PrimaryAccessKey { get; } + public string SecondaryAccessKey { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListUsagesResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListUsagesResult.Serialization.cs new file mode 100644 index 000000000000..e1a9ccf26356 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListUsagesResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ListUsagesResult + { + internal static ListUsagesResult DeserializeListUsagesResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Usage.DeserializeUsage(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ListUsagesResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListUsagesResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListUsagesResult.cs new file mode 100644 index 000000000000..9aa895c997ef --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListUsagesResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The List Usages operation response. + public partial class ListUsagesResult + { + /// Initializes a new instance of ListUsagesResult. + internal ListUsagesResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ListUsagesResult. + /// The list of AML resource usages. + /// The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information. + internal ListUsagesResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of AML resource usages. + public IReadOnlyList Value { get; } + /// The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs new file mode 100644 index 000000000000..7206377c4a83 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ListWorkspaceKeysResult + { + internal static ListWorkspaceKeysResult DeserializeListWorkspaceKeysResult(JsonElement element) + { + Optional userStorageKey = default; + Optional userStorageResourceId = default; + Optional appInsightsInstrumentationKey = default; + Optional containerRegistryCredentials = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userStorageKey")) + { + userStorageKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("userStorageResourceId")) + { + userStorageResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appInsightsInstrumentationKey")) + { + appInsightsInstrumentationKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerRegistryCredentials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + containerRegistryCredentials = RegistryListCredentialsResult.DeserializeRegistryListCredentialsResult(property.Value); + continue; + } + } + return new ListWorkspaceKeysResult(userStorageKey.Value, userStorageResourceId.Value, appInsightsInstrumentationKey.Value, containerRegistryCredentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.cs new file mode 100644 index 000000000000..b0e296c62acf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceKeysResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ListWorkspaceKeysResult. + public partial class ListWorkspaceKeysResult + { + /// Initializes a new instance of ListWorkspaceKeysResult. + internal ListWorkspaceKeysResult() + { + } + + /// Initializes a new instance of ListWorkspaceKeysResult. + /// . + /// . + /// . + /// . + internal ListWorkspaceKeysResult(string userStorageKey, string userStorageResourceId, string appInsightsInstrumentationKey, RegistryListCredentialsResult containerRegistryCredentials) + { + UserStorageKey = userStorageKey; + UserStorageResourceId = userStorageResourceId; + AppInsightsInstrumentationKey = appInsightsInstrumentationKey; + ContainerRegistryCredentials = containerRegistryCredentials; + } + + public string UserStorageKey { get; } + public string UserStorageResourceId { get; } + public string AppInsightsInstrumentationKey { get; } + public RegistryListCredentialsResult ContainerRegistryCredentials { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceQuotas.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceQuotas.Serialization.cs new file mode 100644 index 000000000000..a9abe5004892 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceQuotas.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ListWorkspaceQuotas + { + internal static ListWorkspaceQuotas DeserializeListWorkspaceQuotas(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceQuota.DeserializeResourceQuota(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ListWorkspaceQuotas(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceQuotas.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceQuotas.cs new file mode 100644 index 000000000000..e99e8be55ca9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ListWorkspaceQuotas.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The List WorkspaceQuotasByVMFamily operation response. + public partial class ListWorkspaceQuotas + { + /// Initializes a new instance of ListWorkspaceQuotas. + internal ListWorkspaceQuotas() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ListWorkspaceQuotas. + /// The list of Workspace Quotas by VM Family. + /// The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information. + internal ListWorkspaceQuotas(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of Workspace Quotas by VM Family. + public IReadOnlyList Value { get; } + /// The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.Serialization.cs new file mode 100644 index 000000000000..4e25464495bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class LivenessProbeRequirements : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(FailureThreshold)) + { + writer.WritePropertyName("failureThreshold"); + writer.WriteNumberValue(FailureThreshold.Value); + } + if (Optional.IsDefined(SuccessThreshold)) + { + writer.WritePropertyName("successThreshold"); + writer.WriteNumberValue(SuccessThreshold.Value); + } + if (Optional.IsDefined(TimeoutSeconds)) + { + writer.WritePropertyName("timeoutSeconds"); + writer.WriteNumberValue(TimeoutSeconds.Value); + } + if (Optional.IsDefined(PeriodSeconds)) + { + writer.WritePropertyName("periodSeconds"); + writer.WriteNumberValue(PeriodSeconds.Value); + } + if (Optional.IsDefined(InitialDelaySeconds)) + { + writer.WritePropertyName("initialDelaySeconds"); + writer.WriteNumberValue(InitialDelaySeconds.Value); + } + writer.WriteEndObject(); + } + + internal static LivenessProbeRequirements DeserializeLivenessProbeRequirements(JsonElement element) + { + Optional failureThreshold = default; + Optional successThreshold = default; + Optional timeoutSeconds = default; + Optional periodSeconds = default; + Optional initialDelaySeconds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failureThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + failureThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("successThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + successThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeoutSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + timeoutSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("periodSeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + periodSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("initialDelaySeconds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + initialDelaySeconds = property.Value.GetInt32(); + continue; + } + } + return new LivenessProbeRequirements(Optional.ToNullable(failureThreshold), Optional.ToNullable(successThreshold), Optional.ToNullable(timeoutSeconds), Optional.ToNullable(periodSeconds), Optional.ToNullable(initialDelaySeconds)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.cs new file mode 100644 index 000000000000..73090509bd08 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/LivenessProbeRequirements.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The liveness probe requirements. + public partial class LivenessProbeRequirements + { + /// Initializes a new instance of LivenessProbeRequirements. + public LivenessProbeRequirements() + { + } + + /// Initializes a new instance of LivenessProbeRequirements. + /// The number of failures to allow before returning an unhealthy status. + /// The number of successful probes before returning a healthy status. + /// The probe timeout in seconds. + /// The length of time between probes in seconds. + /// The delay before the first probe in seconds. + internal LivenessProbeRequirements(int? failureThreshold, int? successThreshold, int? timeoutSeconds, int? periodSeconds, int? initialDelaySeconds) + { + FailureThreshold = failureThreshold; + SuccessThreshold = successThreshold; + TimeoutSeconds = timeoutSeconds; + PeriodSeconds = periodSeconds; + InitialDelaySeconds = initialDelaySeconds; + } + + /// The number of failures to allow before returning an unhealthy status. + public int? FailureThreshold { get; set; } + /// The number of successful probes before returning a healthy status. + public int? SuccessThreshold { get; set; } + /// The probe timeout in seconds. + public int? TimeoutSeconds { get; set; } + /// The length of time between probes in seconds. + public int? PeriodSeconds { get; set; } + /// The delay before the first probe in seconds. + public int? InitialDelaySeconds { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.Serialization.cs new file mode 100644 index 000000000000..b0f80570a8ac --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class MLAssistConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InferencingComputeBinding)) + { + writer.WritePropertyName("inferencingComputeBinding"); + writer.WriteObjectValue(InferencingComputeBinding); + } + if (Optional.IsDefined(TrainingComputeBinding)) + { + writer.WritePropertyName("trainingComputeBinding"); + writer.WriteObjectValue(TrainingComputeBinding); + } + if (Optional.IsDefined(MlAssistEnabled)) + { + writer.WritePropertyName("mlAssistEnabled"); + writer.WriteBooleanValue(MlAssistEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static MLAssistConfiguration DeserializeMLAssistConfiguration(JsonElement element) + { + Optional inferencingComputeBinding = default; + Optional trainingComputeBinding = default; + Optional mlAssistEnabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inferencingComputeBinding")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + inferencingComputeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); + continue; + } + if (property.NameEquals("trainingComputeBinding")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + trainingComputeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); + continue; + } + if (property.NameEquals("mlAssistEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mlAssistEnabled = property.Value.GetBoolean(); + continue; + } + } + return new MLAssistConfiguration(inferencingComputeBinding.Value, trainingComputeBinding.Value, Optional.ToNullable(mlAssistEnabled)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.cs new file mode 100644 index 000000000000..fa1d5086bdca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MLAssistConfiguration.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Labeling MLAssist configuration definition. + public partial class MLAssistConfiguration + { + /// Initializes a new instance of MLAssistConfiguration. + public MLAssistConfiguration() + { + } + + /// Initializes a new instance of MLAssistConfiguration. + /// Compute binding definition. + /// Compute binding definition. + /// Indicates whether MLAssist feature is enabled. + internal MLAssistConfiguration(ComputeBinding inferencingComputeBinding, ComputeBinding trainingComputeBinding, bool? mlAssistEnabled) + { + InferencingComputeBinding = inferencingComputeBinding; + TrainingComputeBinding = trainingComputeBinding; + MlAssistEnabled = mlAssistEnabled; + } + + /// Compute binding definition. + public ComputeBinding InferencingComputeBinding { get; set; } + /// Compute binding definition. + public ComputeBinding TrainingComputeBinding { get; set; } + /// Indicates whether MLAssist feature is enabled. + public bool? MlAssistEnabled { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.Serialization.cs new file mode 100644 index 000000000000..1f11c67b539b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class MachineLearningServiceError + { + internal static MachineLearningServiceError DeserializeMachineLearningServiceError(JsonElement element) + { + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = ErrorResponse.DeserializeErrorResponse(property.Value); + continue; + } + } + return new MachineLearningServiceError(error.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.cs new file mode 100644 index 000000000000..99f154656e2c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MachineLearningServiceError.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Wrapper for error response to follow ARM guidelines. + public partial class MachineLearningServiceError + { + /// Initializes a new instance of MachineLearningServiceError. + internal MachineLearningServiceError() + { + } + + /// Initializes a new instance of MachineLearningServiceError. + /// The error response. + internal MachineLearningServiceError(ErrorResponse error) + { + Error = error; + } + + /// The error response. + public ErrorResponse Error { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MediaType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MediaType.cs new file mode 100644 index 000000000000..3f6b1e00e56b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/MediaType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Media type of the job. + public readonly partial struct MediaType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public MediaType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ImageValue = "Image"; + private const string TextValue = "Text"; + + /// Image. + public static MediaType Image { get; } = new MediaType(ImageValue); + /// Text. + public static MediaType Text { get; } = new MediaType(TextValue); + /// Determines if two values are the same. + public static bool operator ==(MediaType left, MediaType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MediaType left, MediaType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MediaType(string value) => new MediaType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MediaType other && Equals(other); + /// + public bool Equals(MediaType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.Serialization.cs new file mode 100644 index 000000000000..cdde334f5cbd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.Serialization.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Model : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Framework)) + { + writer.WritePropertyName("framework"); + writer.WriteStringValue(Framework); + } + if (Optional.IsDefined(FrameworkVersion)) + { + writer.WritePropertyName("frameworkVersion"); + writer.WriteStringValue(FrameworkVersion); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteNumberValue(Version.Value); + } + if (Optional.IsCollectionDefined(Datasets)) + { + writer.WritePropertyName("datasets"); + writer.WriteStartArray(); + foreach (var item in Datasets) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("url"); + writer.WriteStringValue(Url); + writer.WritePropertyName("mimeType"); + writer.WriteStringValue(MimeType); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(CreatedTime)) + { + writer.WritePropertyName("createdTime"); + writer.WriteStringValue(CreatedTime.Value, "O"); + } + if (Optional.IsDefined(ModifiedTime)) + { + writer.WritePropertyName("modifiedTime"); + writer.WriteStringValue(ModifiedTime.Value, "O"); + } + if (Optional.IsDefined(Unpack)) + { + writer.WritePropertyName("unpack"); + writer.WriteBooleanValue(Unpack.Value); + } + if (Optional.IsDefined(ParentModelId)) + { + writer.WritePropertyName("parentModelId"); + writer.WriteStringValue(ParentModelId); + } + if (Optional.IsDefined(RunId)) + { + writer.WritePropertyName("runId"); + writer.WriteStringValue(RunId); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(DerivedModelIds)) + { + writer.WritePropertyName("derivedModelIds"); + writer.WriteStartArray(); + foreach (var item in DerivedModelIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SampleInputData)) + { + writer.WritePropertyName("sampleInputData"); + writer.WriteStringValue(SampleInputData); + } + if (Optional.IsDefined(SampleOutputData)) + { + writer.WritePropertyName("sampleOutputData"); + writer.WriteStringValue(SampleOutputData); + } + if (Optional.IsDefined(ResourceRequirements)) + { + writer.WritePropertyName("resourceRequirements"); + writer.WriteObjectValue(ResourceRequirements); + } + writer.WriteEndObject(); + } + + internal static Model DeserializeModel(JsonElement element) + { + Optional id = default; + string name = default; + Optional framework = default; + Optional frameworkVersion = default; + Optional version = default; + Optional> datasets = default; + string url = default; + string mimeType = default; + Optional description = default; + Optional createdTime = default; + Optional modifiedTime = default; + Optional unpack = default; + Optional parentModelId = default; + Optional runId = default; + Optional experimentName = default; + Optional> kvTags = default; + Optional> properties = default; + Optional> derivedModelIds = default; + Optional sampleInputData = default; + Optional sampleOutputData = default; + Optional resourceRequirements = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("framework")) + { + framework = property.Value.GetString(); + continue; + } + if (property.NameEquals("frameworkVersion")) + { + frameworkVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("datasets")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatasetReference.DeserializeDatasetReference(item)); + } + datasets = array; + continue; + } + if (property.NameEquals("url")) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("mimeType")) + { + mimeType = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("unpack")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unpack = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("parentModelId")) + { + parentModelId = property.Value.GetString(); + continue; + } + if (property.NameEquals("runId")) + { + runId = property.Value.GetString(); + continue; + } + if (property.NameEquals("experimentName")) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("kvTags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + kvTags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("derivedModelIds")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + derivedModelIds = array; + continue; + } + if (property.NameEquals("sampleInputData")) + { + sampleInputData = property.Value.GetString(); + continue; + } + if (property.NameEquals("sampleOutputData")) + { + sampleOutputData = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceRequirements")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceRequirements = ContainerResourceRequirements.DeserializeContainerResourceRequirements(property.Value); + continue; + } + } + return new Model(id.Value, name, framework.Value, frameworkVersion.Value, Optional.ToNullable(version), Optional.ToList(datasets), url, mimeType, description.Value, Optional.ToNullable(createdTime), Optional.ToNullable(modifiedTime), Optional.ToNullable(unpack), parentModelId.Value, runId.Value, experimentName.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToList(derivedModelIds), sampleInputData.Value, sampleOutputData.Value, resourceRequirements.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.cs new file mode 100644 index 000000000000..b438e75a0751 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Model.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// An Azure Machine Learning Model. + public partial class Model + { + /// Initializes a new instance of Model. + /// The Model name. + /// The URL of the Model. Usually a SAS 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. + /// , , or is null. + public Model(string name, string url, string mimeType) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (url == null) + { + throw new ArgumentNullException(nameof(url)); + } + if (mimeType == null) + { + throw new ArgumentNullException(nameof(mimeType)); + } + + Name = name; + Datasets = new ChangeTrackingList(); + Url = url; + MimeType = mimeType; + KvTags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + DerivedModelIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of Model. + /// The Model Id. + /// The Model name. + /// The Model framework. + /// The Model framework version. + /// The Model version assigned by Model Management Service. + /// The list of datasets associated with the model. + /// The URL of the Model. Usually a SAS 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. + /// The Model description text. + /// The Model creation time (UTC). + /// The Model last modified time (UTC). + /// Indicates whether we need to unpack the Model during docker Image creation. + /// The Parent Model Id. + /// The RunId that created this model. + /// The name of the experiment where this model was created. + /// The Model tag dictionary. Items are mutable. + /// The Model property dictionary. Properties are immutable. + /// Models derived from this model. + /// Sample Input Data for the Model. A reference to a dataset in the workspace in the format aml://dataset/{datasetId}. + /// Sample Output Data for the Model. A reference to a dataset in the workspace in the format aml://dataset/{datasetId}. + /// Resource requirements for the model. + internal Model(string id, string name, string framework, string frameworkVersion, long? version, IList datasets, string url, string mimeType, string description, DateTimeOffset? createdTime, DateTimeOffset? modifiedTime, bool? unpack, string parentModelId, string runId, string experimentName, IDictionary kvTags, IDictionary properties, IList derivedModelIds, string sampleInputData, string sampleOutputData, ContainerResourceRequirements resourceRequirements) + { + Id = id; + Name = name; + Framework = framework; + FrameworkVersion = frameworkVersion; + Version = version; + Datasets = datasets; + Url = url; + MimeType = mimeType; + Description = description; + CreatedTime = createdTime; + ModifiedTime = modifiedTime; + Unpack = unpack; + ParentModelId = parentModelId; + RunId = runId; + ExperimentName = experimentName; + KvTags = kvTags; + Properties = properties; + DerivedModelIds = derivedModelIds; + SampleInputData = sampleInputData; + SampleOutputData = sampleOutputData; + ResourceRequirements = resourceRequirements; + } + + /// The Model Id. + public string Id { get; set; } + /// The Model name. + public string Name { get; set; } + /// The Model framework. + public string Framework { get; set; } + /// The Model framework version. + public string FrameworkVersion { get; set; } + /// The Model version assigned by Model Management Service. + public long? Version { get; set; } + /// The list of datasets associated with the model. + public IList Datasets { get; } + /// The URL of the Model. Usually a SAS URL. + public string Url { get; set; } + /// The MIME type of Model content. For more details about MIME type, please open https://www.iana.org/assignments/media-types/media-types.xhtml. + public string MimeType { get; set; } + /// The Model description text. + public string Description { get; set; } + /// The Model creation time (UTC). + public DateTimeOffset? CreatedTime { get; set; } + /// The Model last modified time (UTC). + public DateTimeOffset? ModifiedTime { get; set; } + /// Indicates whether we need to unpack the Model during docker Image creation. + public bool? Unpack { get; set; } + /// The Parent Model Id. + public string ParentModelId { get; set; } + /// The RunId that created this model. + public string RunId { get; set; } + /// The name of the experiment where this model was created. + public string ExperimentName { get; set; } + /// The Model tag dictionary. Items are mutable. + public IDictionary KvTags { get; } + /// The Model property dictionary. Properties are immutable. + public IDictionary Properties { get; } + /// Models derived from this model. + public IList DerivedModelIds { get; } + /// Sample Input Data for the Model. A reference to a dataset in the workspace in the format aml://dataset/{datasetId}. + public string SampleInputData { get; set; } + /// Sample Output Data for the Model. A reference to a dataset in the workspace in the format aml://dataset/{datasetId}. + public string SampleOutputData { get; set; } + /// Resource requirements for the model. + public ContainerResourceRequirements ResourceRequirements { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.Serialization.cs new file mode 100644 index 000000000000..044762e289fe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelContainer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(LatestVersions)) + { + writer.WritePropertyName("latestVersions"); + writer.WriteStartArray(); + foreach (var item in LatestVersions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static ModelContainer DeserializeModelContainer(JsonElement element) + { + Optional> latestVersions = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("latestVersions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ModelVersionResource.DeserializeModelVersionResource(item)); + } + latestVersions = array; + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new ModelContainer(Optional.ToList(latestVersions), description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.cs new file mode 100644 index 000000000000..9aadb0fdd5c2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainer.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ModelContainer. + public partial class ModelContainer + { + /// Initializes a new instance of ModelContainer. + public ModelContainer() + { + LatestVersions = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ModelContainer. + /// Latest model versions for each stage. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + internal ModelContainer(IList latestVersions, string description, IDictionary tags, IDictionary properties) + { + LatestVersions = latestVersions; + Description = description; + Tags = tags; + Properties = properties; + } + + /// Latest model versions for each stage. + public IList LatestVersions { get; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + /// The asset property dictionary. + public IDictionary Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.Serialization.cs new file mode 100644 index 000000000000..def6d6cbfb4d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelContainerResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static ModelContainerResource DeserializeModelContainerResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + ModelContainer properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = ModelContainer.DeserializeModelContainer(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new ModelContainerResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.cs new file mode 100644 index 000000000000..fec2f35f7cf2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class ModelContainerResource + { + /// Initializes a new instance of ModelContainerResource. + /// . + /// is null. + public ModelContainerResource(ModelContainer properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of ModelContainerResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// . + /// Metadata pertaining to creation and last modification of the resource. + internal ModelContainerResource(string id, string name, string type, ModelContainer properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + public ModelContainer Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..a51a136334cd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelContainerResourceArmPaginatedResult + { + internal static ModelContainerResourceArmPaginatedResult DeserializeModelContainerResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ModelContainerResource.DeserializeModelContainerResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ModelContainerResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..6880683c3a57 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of ModelContainer entities. + public partial class ModelContainerResourceArmPaginatedResult + { + /// Initializes a new instance of ModelContainerResourceArmPaginatedResult. + internal ModelContainerResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ModelContainerResourceArmPaginatedResult. + /// An array of objects of type ModelContainer. + /// . + internal ModelContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type ModelContainer. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.Serialization.cs new file mode 100644 index 000000000000..208165b30f16 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelDataCollection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EventHubEnabled)) + { + writer.WritePropertyName("eventHubEnabled"); + writer.WriteBooleanValue(EventHubEnabled.Value); + } + if (Optional.IsDefined(StorageEnabled)) + { + writer.WritePropertyName("storageEnabled"); + writer.WriteBooleanValue(StorageEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static ModelDataCollection DeserializeModelDataCollection(JsonElement element) + { + Optional eventHubEnabled = default; + Optional storageEnabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventHubEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + eventHubEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("storageEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + storageEnabled = property.Value.GetBoolean(); + continue; + } + } + return new ModelDataCollection(Optional.ToNullable(eventHubEnabled), Optional.ToNullable(storageEnabled)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.cs new file mode 100644 index 000000000000..0d3262553f45 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDataCollection.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Model data collection properties. + public partial class ModelDataCollection + { + /// Initializes a new instance of ModelDataCollection. + public ModelDataCollection() + { + } + + /// Initializes a new instance of ModelDataCollection. + /// Option for enabling/disabling Event Hub. + /// Option for enabling/disabling storage. + internal ModelDataCollection(bool? eventHubEnabled, bool? storageEnabled) + { + EventHubEnabled = eventHubEnabled; + StorageEnabled = storageEnabled; + } + + /// Option for enabling/disabling Event Hub. + public bool? EventHubEnabled { get; set; } + /// Option for enabling/disabling storage. + public bool? StorageEnabled { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.Serialization.cs new file mode 100644 index 000000000000..e07bb88689d6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelDockerSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BaseImage)) + { + writer.WritePropertyName("baseImage"); + writer.WriteStringValue(BaseImage); + } + if (Optional.IsDefined(BaseDockerfile)) + { + writer.WritePropertyName("baseDockerfile"); + writer.WriteStringValue(BaseDockerfile); + } + if (Optional.IsDefined(BaseImageRegistry)) + { + writer.WritePropertyName("baseImageRegistry"); + writer.WriteObjectValue(BaseImageRegistry); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.cs new file mode 100644 index 000000000000..fb73dfba61e6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSection.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ModelDockerSection. + public partial class ModelDockerSection + { + /// Initializes a new instance of ModelDockerSection. + public ModelDockerSection() + { + } + + /// Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. + public string BaseImage { get; set; } + /// Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. + public string BaseDockerfile { get; set; } + /// Image registry that contains the base image. + public ContainerRegistry BaseImageRegistry { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.Serialization.cs new file mode 100644 index 000000000000..5229018c15a0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelDockerSectionBaseImageRegistry : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"); + writer.WriteStringValue(Address); + } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.cs new file mode 100644 index 000000000000..59c33b777a63 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionBaseImageRegistry.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Image registry that contains the base image. + public partial class ModelDockerSectionBaseImageRegistry : ContainerRegistry + { + /// Initializes a new instance of ModelDockerSectionBaseImageRegistry. + public ModelDockerSectionBaseImageRegistry() + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.Serialization.cs new file mode 100644 index 000000000000..4ff99a60bc16 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelDockerSectionResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BaseImage)) + { + writer.WritePropertyName("baseImage"); + writer.WriteStringValue(BaseImage); + } + if (Optional.IsDefined(BaseDockerfile)) + { + writer.WritePropertyName("baseDockerfile"); + writer.WriteStringValue(BaseDockerfile); + } + if (Optional.IsDefined(BaseImageRegistry)) + { + writer.WritePropertyName("baseImageRegistry"); + writer.WriteObjectValue(BaseImageRegistry); + } + writer.WriteEndObject(); + } + + internal static ModelDockerSectionResponse DeserializeModelDockerSectionResponse(JsonElement element) + { + Optional baseImage = default; + Optional baseDockerfile = default; + Optional baseImageRegistry = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("baseImage")) + { + baseImage = property.Value.GetString(); + continue; + } + if (property.NameEquals("baseDockerfile")) + { + baseDockerfile = property.Value.GetString(); + continue; + } + if (property.NameEquals("baseImageRegistry")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + baseImageRegistry = ContainerRegistryResponse.DeserializeContainerRegistryResponse(property.Value); + continue; + } + } + return new ModelDockerSectionResponse(baseImage.Value, baseDockerfile.Value, baseImageRegistry.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.cs new file mode 100644 index 000000000000..94b3bf550786 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponse.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ModelDockerSectionResponse. + public partial class ModelDockerSectionResponse + { + /// Initializes a new instance of ModelDockerSectionResponse. + public ModelDockerSectionResponse() + { + } + + /// Initializes a new instance of ModelDockerSectionResponse. + /// Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. + /// Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. + /// Image registry that contains the base image. + internal ModelDockerSectionResponse(string baseImage, string baseDockerfile, ContainerRegistryResponse baseImageRegistry) + { + BaseImage = baseImage; + BaseDockerfile = baseDockerfile; + BaseImageRegistry = baseImageRegistry; + } + + /// Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. + public string BaseImage { get; set; } + /// Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. + public string BaseDockerfile { get; set; } + /// Image registry that contains the base image. + public ContainerRegistryResponse BaseImageRegistry { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.Serialization.cs new file mode 100644 index 000000000000..1760c6694e49 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelDockerSectionResponseBaseImageRegistry : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"); + writer.WriteStringValue(Address); + } + writer.WriteEndObject(); + } + + internal static ModelDockerSectionResponseBaseImageRegistry DeserializeModelDockerSectionResponseBaseImageRegistry(JsonElement element) + { + Optional address = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("address")) + { + address = property.Value.GetString(); + continue; + } + } + return new ModelDockerSectionResponseBaseImageRegistry(address.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.cs new file mode 100644 index 000000000000..989460238400 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelDockerSectionResponseBaseImageRegistry.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Image registry that contains the base image. + public partial class ModelDockerSectionResponseBaseImageRegistry : ContainerRegistryResponse + { + /// Initializes a new instance of ModelDockerSectionResponseBaseImageRegistry. + public ModelDockerSectionResponseBaseImageRegistry() + { + } + + /// Initializes a new instance of ModelDockerSectionResponseBaseImageRegistry. + /// . + internal ModelDockerSectionResponseBaseImageRegistry(string address) : base(address) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.Serialization.cs new file mode 100644 index 000000000000..08be83252f21 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Python)) + { + writer.WritePropertyName("python"); + writer.WriteObjectValue(Python); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Docker)) + { + writer.WritePropertyName("docker"); + writer.WriteObjectValue(Docker); + } + if (Optional.IsDefined(Spark)) + { + writer.WritePropertyName("spark"); + writer.WriteObjectValue(Spark); + } + if (Optional.IsDefined(R)) + { + writer.WritePropertyName("r"); + writer.WriteObjectValue(R); + } + if (Optional.IsDefined(InferencingStackVersion)) + { + writer.WritePropertyName("inferencingStackVersion"); + writer.WriteStringValue(InferencingStackVersion); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.cs new file mode 100644 index 000000000000..34faa79e4081 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinition.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ModelEnvironmentDefinition. + public partial class ModelEnvironmentDefinition + { + /// Initializes a new instance of ModelEnvironmentDefinition. + public ModelEnvironmentDefinition() + { + EnvironmentVariables = new ChangeTrackingDictionary(); + } + + /// The name of the environment. + public string Name { get; set; } + /// The environment version. + public string Version { get; set; } + /// Settings for a Python environment. + public ModelPythonSection Python { get; set; } + /// Definition of environment variables to be defined in the environment. + public IDictionary EnvironmentVariables { get; } + /// The definition of a Docker container. + public ModelDockerSection Docker { get; set; } + /// The configuration for a Spark environment. + public ModelSparkSection Spark { get; set; } + /// Settings for a R environment. + public RSection R { get; set; } + /// The inferencing stack version added to the image. To avoid adding an inferencing stack, do not set this value. Valid values: "latest". + public string InferencingStackVersion { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.Serialization.cs new file mode 100644 index 000000000000..3de61b72cd66 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionDocker : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BaseImage)) + { + writer.WritePropertyName("baseImage"); + writer.WriteStringValue(BaseImage); + } + if (Optional.IsDefined(BaseDockerfile)) + { + writer.WritePropertyName("baseDockerfile"); + writer.WriteStringValue(BaseDockerfile); + } + if (Optional.IsDefined(BaseImageRegistry)) + { + writer.WritePropertyName("baseImageRegistry"); + writer.WriteObjectValue(BaseImageRegistry); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.cs new file mode 100644 index 000000000000..cd5ffd68e1c3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionDocker.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The definition of a Docker container. + public partial class ModelEnvironmentDefinitionDocker : ModelDockerSection + { + /// Initializes a new instance of ModelEnvironmentDefinitionDocker. + public ModelEnvironmentDefinitionDocker() + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.Serialization.cs new file mode 100644 index 000000000000..c0ee99299fda --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionPython : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InterpreterPath)) + { + writer.WritePropertyName("interpreterPath"); + writer.WriteStringValue(InterpreterPath); + } + if (Optional.IsDefined(UserManagedDependencies)) + { + writer.WritePropertyName("userManagedDependencies"); + writer.WriteBooleanValue(UserManagedDependencies.Value); + } + if (Optional.IsDefined(CondaDependencies)) + { + writer.WritePropertyName("condaDependencies"); + writer.WriteObjectValue(CondaDependencies); + } + if (Optional.IsDefined(BaseCondaEnvironment)) + { + writer.WritePropertyName("baseCondaEnvironment"); + writer.WriteStringValue(BaseCondaEnvironment); + } + writer.WriteEndObject(); + } + + internal static ModelEnvironmentDefinitionPython DeserializeModelEnvironmentDefinitionPython(JsonElement element) + { + Optional interpreterPath = default; + Optional userManagedDependencies = default; + Optional condaDependencies = default; + Optional baseCondaEnvironment = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("interpreterPath")) + { + interpreterPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("userManagedDependencies")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + userManagedDependencies = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("condaDependencies")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + condaDependencies = property.Value.GetObject(); + continue; + } + if (property.NameEquals("baseCondaEnvironment")) + { + baseCondaEnvironment = property.Value.GetString(); + continue; + } + } + return new ModelEnvironmentDefinitionPython(interpreterPath.Value, Optional.ToNullable(userManagedDependencies), condaDependencies.Value, baseCondaEnvironment.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.cs new file mode 100644 index 000000000000..1bfa54833411 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionPython.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Settings for a Python environment. + public partial class ModelEnvironmentDefinitionPython : ModelPythonSection + { + /// Initializes a new instance of ModelEnvironmentDefinitionPython. + public ModelEnvironmentDefinitionPython() + { + } + + /// Initializes a new instance of ModelEnvironmentDefinitionPython. + /// The python interpreter path to use if an environment build is not required. The path specified gets used to call the user script. + /// True means that AzureML reuses an existing python environment; False means that AzureML will create a python environment based on the Conda dependencies specification. + /// A JObject containing Conda dependencies. + /// . + internal ModelEnvironmentDefinitionPython(string interpreterPath, bool? userManagedDependencies, object condaDependencies, string baseCondaEnvironment) : base(interpreterPath, userManagedDependencies, condaDependencies, baseCondaEnvironment) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.Serialization.cs new file mode 100644 index 000000000000..439a891d34f4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionR : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RVersion)) + { + writer.WritePropertyName("rVersion"); + writer.WriteStringValue(RVersion); + } + if (Optional.IsDefined(UserManaged)) + { + writer.WritePropertyName("userManaged"); + writer.WriteBooleanValue(UserManaged.Value); + } + if (Optional.IsDefined(RscriptPath)) + { + writer.WritePropertyName("rscriptPath"); + writer.WriteStringValue(RscriptPath); + } + if (Optional.IsDefined(SnapshotDate)) + { + writer.WritePropertyName("snapshotDate"); + writer.WriteStringValue(SnapshotDate); + } + if (Optional.IsCollectionDefined(CranPackages)) + { + writer.WritePropertyName("cranPackages"); + writer.WriteStartArray(); + foreach (var item in CranPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(GitHubPackages)) + { + writer.WritePropertyName("gitHubPackages"); + writer.WriteStartArray(); + foreach (var item in GitHubPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(CustomUrlPackages)) + { + writer.WritePropertyName("customUrlPackages"); + writer.WriteStartArray(); + foreach (var item in CustomUrlPackages) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BioConductorPackages)) + { + writer.WritePropertyName("bioConductorPackages"); + writer.WriteStartArray(); + foreach (var item in BioConductorPackages) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.cs new file mode 100644 index 000000000000..ce3340d68c64 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionR.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Settings for a R environment. + public partial class ModelEnvironmentDefinitionR : RSection + { + /// Initializes a new instance of ModelEnvironmentDefinitionR. + public ModelEnvironmentDefinitionR() + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.Serialization.cs new file mode 100644 index 000000000000..6daa96b185e4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Python)) + { + writer.WritePropertyName("python"); + writer.WriteObjectValue(Python); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Docker)) + { + writer.WritePropertyName("docker"); + writer.WriteObjectValue(Docker); + } + if (Optional.IsDefined(Spark)) + { + writer.WritePropertyName("spark"); + writer.WriteObjectValue(Spark); + } + if (Optional.IsDefined(R)) + { + writer.WritePropertyName("r"); + writer.WriteObjectValue(R); + } + if (Optional.IsDefined(InferencingStackVersion)) + { + writer.WritePropertyName("inferencingStackVersion"); + writer.WriteStringValue(InferencingStackVersion); + } + writer.WriteEndObject(); + } + + internal static ModelEnvironmentDefinitionResponse DeserializeModelEnvironmentDefinitionResponse(JsonElement element) + { + Optional name = default; + Optional version = default; + Optional python = default; + Optional> environmentVariables = default; + Optional docker = default; + Optional spark = default; + Optional r = default; + Optional inferencingStackVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("python")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + python = ModelPythonSection.DeserializeModelPythonSection(property.Value); + continue; + } + if (property.NameEquals("environmentVariables")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("docker")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + docker = ModelDockerSectionResponse.DeserializeModelDockerSectionResponse(property.Value); + continue; + } + if (property.NameEquals("spark")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + spark = ModelSparkSection.DeserializeModelSparkSection(property.Value); + continue; + } + if (property.NameEquals("r")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + r = RSectionResponse.DeserializeRSectionResponse(property.Value); + continue; + } + if (property.NameEquals("inferencingStackVersion")) + { + inferencingStackVersion = property.Value.GetString(); + continue; + } + } + return new ModelEnvironmentDefinitionResponse(name.Value, version.Value, python.Value, Optional.ToDictionary(environmentVariables), docker.Value, spark.Value, r.Value, inferencingStackVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.cs new file mode 100644 index 000000000000..24dd308f37b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponse.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ModelEnvironmentDefinitionResponse. + public partial class ModelEnvironmentDefinitionResponse + { + /// Initializes a new instance of ModelEnvironmentDefinitionResponse. + public ModelEnvironmentDefinitionResponse() + { + EnvironmentVariables = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ModelEnvironmentDefinitionResponse. + /// The name of the environment. + /// The environment version. + /// Settings for a Python environment. + /// Definition of environment variables to be defined in the environment. + /// The definition of a Docker container. + /// The configuration for a Spark environment. + /// Settings for a R environment. + /// The inferencing stack version added to the image. To avoid adding an inferencing stack, do not set this value. Valid values: "latest". + internal ModelEnvironmentDefinitionResponse(string name, string version, ModelPythonSection python, IDictionary environmentVariables, ModelDockerSectionResponse docker, ModelSparkSection spark, RSectionResponse r, string inferencingStackVersion) + { + Name = name; + Version = version; + Python = python; + EnvironmentVariables = environmentVariables; + Docker = docker; + Spark = spark; + R = r; + InferencingStackVersion = inferencingStackVersion; + } + + /// The name of the environment. + public string Name { get; set; } + /// The environment version. + public string Version { get; set; } + /// Settings for a Python environment. + public ModelPythonSection Python { get; set; } + /// Definition of environment variables to be defined in the environment. + public IDictionary EnvironmentVariables { get; } + /// The definition of a Docker container. + public ModelDockerSectionResponse Docker { get; set; } + /// The configuration for a Spark environment. + public ModelSparkSection Spark { get; set; } + /// Settings for a R environment. + public RSectionResponse R { get; set; } + /// The inferencing stack version added to the image. To avoid adding an inferencing stack, do not set this value. Valid values: "latest". + public string InferencingStackVersion { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.Serialization.cs new file mode 100644 index 000000000000..8a56fa2db98e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionResponseDocker : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BaseImage)) + { + writer.WritePropertyName("baseImage"); + writer.WriteStringValue(BaseImage); + } + if (Optional.IsDefined(BaseDockerfile)) + { + writer.WritePropertyName("baseDockerfile"); + writer.WriteStringValue(BaseDockerfile); + } + if (Optional.IsDefined(BaseImageRegistry)) + { + writer.WritePropertyName("baseImageRegistry"); + writer.WriteObjectValue(BaseImageRegistry); + } + writer.WriteEndObject(); + } + + internal static ModelEnvironmentDefinitionResponseDocker DeserializeModelEnvironmentDefinitionResponseDocker(JsonElement element) + { + Optional baseImage = default; + Optional baseDockerfile = default; + Optional baseImageRegistry = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("baseImage")) + { + baseImage = property.Value.GetString(); + continue; + } + if (property.NameEquals("baseDockerfile")) + { + baseDockerfile = property.Value.GetString(); + continue; + } + if (property.NameEquals("baseImageRegistry")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + baseImageRegistry = ContainerRegistryResponse.DeserializeContainerRegistryResponse(property.Value); + continue; + } + } + return new ModelEnvironmentDefinitionResponseDocker(baseImage.Value, baseDockerfile.Value, baseImageRegistry.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.cs new file mode 100644 index 000000000000..b48ddd250794 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseDocker.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The definition of a Docker container. + public partial class ModelEnvironmentDefinitionResponseDocker : ModelDockerSectionResponse + { + /// Initializes a new instance of ModelEnvironmentDefinitionResponseDocker. + public ModelEnvironmentDefinitionResponseDocker() + { + } + + /// Initializes a new instance of ModelEnvironmentDefinitionResponseDocker. + /// Base image used for Docker-based runs. Mutually exclusive with BaseDockerfile. + /// Base Dockerfile used for Docker-based runs. Mutually exclusive with BaseImage. + /// Image registry that contains the base image. + internal ModelEnvironmentDefinitionResponseDocker(string baseImage, string baseDockerfile, ContainerRegistryResponse baseImageRegistry) : base(baseImage, baseDockerfile, baseImageRegistry) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.Serialization.cs new file mode 100644 index 000000000000..7b27d767104c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionResponsePython : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InterpreterPath)) + { + writer.WritePropertyName("interpreterPath"); + writer.WriteStringValue(InterpreterPath); + } + if (Optional.IsDefined(UserManagedDependencies)) + { + writer.WritePropertyName("userManagedDependencies"); + writer.WriteBooleanValue(UserManagedDependencies.Value); + } + if (Optional.IsDefined(CondaDependencies)) + { + writer.WritePropertyName("condaDependencies"); + writer.WriteObjectValue(CondaDependencies); + } + if (Optional.IsDefined(BaseCondaEnvironment)) + { + writer.WritePropertyName("baseCondaEnvironment"); + writer.WriteStringValue(BaseCondaEnvironment); + } + writer.WriteEndObject(); + } + + internal static ModelEnvironmentDefinitionResponsePython DeserializeModelEnvironmentDefinitionResponsePython(JsonElement element) + { + Optional interpreterPath = default; + Optional userManagedDependencies = default; + Optional condaDependencies = default; + Optional baseCondaEnvironment = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("interpreterPath")) + { + interpreterPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("userManagedDependencies")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + userManagedDependencies = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("condaDependencies")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + condaDependencies = property.Value.GetObject(); + continue; + } + if (property.NameEquals("baseCondaEnvironment")) + { + baseCondaEnvironment = property.Value.GetString(); + continue; + } + } + return new ModelEnvironmentDefinitionResponsePython(interpreterPath.Value, Optional.ToNullable(userManagedDependencies), condaDependencies.Value, baseCondaEnvironment.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.cs new file mode 100644 index 000000000000..e4403d5c5736 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponsePython.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Settings for a Python environment. + public partial class ModelEnvironmentDefinitionResponsePython : ModelPythonSection + { + /// Initializes a new instance of ModelEnvironmentDefinitionResponsePython. + public ModelEnvironmentDefinitionResponsePython() + { + } + + /// Initializes a new instance of ModelEnvironmentDefinitionResponsePython. + /// The python interpreter path to use if an environment build is not required. The path specified gets used to call the user script. + /// True means that AzureML reuses an existing python environment; False means that AzureML will create a python environment based on the Conda dependencies specification. + /// A JObject containing Conda dependencies. + /// . + internal ModelEnvironmentDefinitionResponsePython(string interpreterPath, bool? userManagedDependencies, object condaDependencies, string baseCondaEnvironment) : base(interpreterPath, userManagedDependencies, condaDependencies, baseCondaEnvironment) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.Serialization.cs new file mode 100644 index 000000000000..c963aa32f082 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionResponseR : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RVersion)) + { + writer.WritePropertyName("rVersion"); + writer.WriteStringValue(RVersion); + } + if (Optional.IsDefined(UserManaged)) + { + writer.WritePropertyName("userManaged"); + writer.WriteBooleanValue(UserManaged.Value); + } + if (Optional.IsDefined(RscriptPath)) + { + writer.WritePropertyName("rscriptPath"); + writer.WriteStringValue(RscriptPath); + } + if (Optional.IsDefined(SnapshotDate)) + { + writer.WritePropertyName("snapshotDate"); + writer.WriteStringValue(SnapshotDate); + } + if (Optional.IsCollectionDefined(CranPackages)) + { + writer.WritePropertyName("cranPackages"); + writer.WriteStartArray(); + foreach (var item in CranPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(GitHubPackages)) + { + writer.WritePropertyName("gitHubPackages"); + writer.WriteStartArray(); + foreach (var item in GitHubPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(CustomUrlPackages)) + { + writer.WritePropertyName("customUrlPackages"); + writer.WriteStartArray(); + foreach (var item in CustomUrlPackages) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BioConductorPackages)) + { + writer.WritePropertyName("bioConductorPackages"); + writer.WriteStartArray(); + foreach (var item in BioConductorPackages) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static ModelEnvironmentDefinitionResponseR DeserializeModelEnvironmentDefinitionResponseR(JsonElement element) + { + Optional rVersion = default; + Optional userManaged = default; + Optional rscriptPath = default; + Optional snapshotDate = default; + Optional> cranPackages = default; + Optional> gitHubPackages = default; + Optional> customUrlPackages = default; + Optional> bioConductorPackages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rVersion")) + { + rVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("userManaged")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + userManaged = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("rscriptPath")) + { + rscriptPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("snapshotDate")) + { + snapshotDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("cranPackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RCranPackage.DeserializeRCranPackage(item)); + } + cranPackages = array; + continue; + } + if (property.NameEquals("gitHubPackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RGitHubPackageResponse.DeserializeRGitHubPackageResponse(item)); + } + gitHubPackages = array; + continue; + } + if (property.NameEquals("customUrlPackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + customUrlPackages = array; + continue; + } + if (property.NameEquals("bioConductorPackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + bioConductorPackages = array; + continue; + } + } + return new ModelEnvironmentDefinitionResponseR(rVersion.Value, Optional.ToNullable(userManaged), rscriptPath.Value, snapshotDate.Value, Optional.ToList(cranPackages), Optional.ToList(gitHubPackages), Optional.ToList(customUrlPackages), Optional.ToList(bioConductorPackages)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.cs new file mode 100644 index 000000000000..e288b4d1dc82 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseR.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Settings for a R environment. + public partial class ModelEnvironmentDefinitionResponseR : RSectionResponse + { + /// Initializes a new instance of ModelEnvironmentDefinitionResponseR. + public ModelEnvironmentDefinitionResponseR() + { + } + + /// Initializes a new instance of ModelEnvironmentDefinitionResponseR. + /// The version of R to be installed. + /// Indicates whether the environment is managed by user or by AzureML. + /// + /// The Rscript path to use if an environment build is not required. + /// + /// The path specified gets used to call the user script. + /// + /// Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". + /// The CRAN packages to use. + /// The packages directly from GitHub. + /// The packages from custom urls. + /// The packages from Bioconductor. + internal ModelEnvironmentDefinitionResponseR(string rVersion, bool? userManaged, string rscriptPath, string snapshotDate, IList cranPackages, IList gitHubPackages, IList customUrlPackages, IList bioConductorPackages) : base(rVersion, userManaged, rscriptPath, snapshotDate, cranPackages, gitHubPackages, customUrlPackages, bioConductorPackages) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.Serialization.cs new file mode 100644 index 000000000000..90b2e23af52d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionResponseSpark : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Repositories)) + { + writer.WritePropertyName("repositories"); + writer.WriteStartArray(); + foreach (var item in Repositories) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Packages)) + { + writer.WritePropertyName("packages"); + writer.WriteStartArray(); + foreach (var item in Packages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PrecachePackages)) + { + writer.WritePropertyName("precachePackages"); + writer.WriteBooleanValue(PrecachePackages.Value); + } + writer.WriteEndObject(); + } + + internal static ModelEnvironmentDefinitionResponseSpark DeserializeModelEnvironmentDefinitionResponseSpark(JsonElement element) + { + Optional> repositories = default; + Optional> packages = default; + Optional precachePackages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("repositories")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + repositories = array; + continue; + } + if (property.NameEquals("packages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SparkMavenPackage.DeserializeSparkMavenPackage(item)); + } + packages = array; + continue; + } + if (property.NameEquals("precachePackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + precachePackages = property.Value.GetBoolean(); + continue; + } + } + return new ModelEnvironmentDefinitionResponseSpark(Optional.ToList(repositories), Optional.ToList(packages), Optional.ToNullable(precachePackages)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.cs new file mode 100644 index 000000000000..138e4a9834ad --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionResponseSpark.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The configuration for a Spark environment. + public partial class ModelEnvironmentDefinitionResponseSpark : ModelSparkSection + { + /// Initializes a new instance of ModelEnvironmentDefinitionResponseSpark. + public ModelEnvironmentDefinitionResponseSpark() + { + } + + /// Initializes a new instance of ModelEnvironmentDefinitionResponseSpark. + /// The list of spark repositories. + /// The Spark packages to use. + /// Whether to precache the packages. + internal ModelEnvironmentDefinitionResponseSpark(IList repositories, IList packages, bool? precachePackages) : base(repositories, packages, precachePackages) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.Serialization.cs new file mode 100644 index 000000000000..bd0ea9b00cf8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelEnvironmentDefinitionSpark : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Repositories)) + { + writer.WritePropertyName("repositories"); + writer.WriteStartArray(); + foreach (var item in Repositories) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Packages)) + { + writer.WritePropertyName("packages"); + writer.WriteStartArray(); + foreach (var item in Packages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PrecachePackages)) + { + writer.WritePropertyName("precachePackages"); + writer.WriteBooleanValue(PrecachePackages.Value); + } + writer.WriteEndObject(); + } + + internal static ModelEnvironmentDefinitionSpark DeserializeModelEnvironmentDefinitionSpark(JsonElement element) + { + Optional> repositories = default; + Optional> packages = default; + Optional precachePackages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("repositories")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + repositories = array; + continue; + } + if (property.NameEquals("packages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SparkMavenPackage.DeserializeSparkMavenPackage(item)); + } + packages = array; + continue; + } + if (property.NameEquals("precachePackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + precachePackages = property.Value.GetBoolean(); + continue; + } + } + return new ModelEnvironmentDefinitionSpark(Optional.ToList(repositories), Optional.ToList(packages), Optional.ToNullable(precachePackages)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.cs new file mode 100644 index 000000000000..2976d68c1a34 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelEnvironmentDefinitionSpark.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The configuration for a Spark environment. + public partial class ModelEnvironmentDefinitionSpark : ModelSparkSection + { + /// Initializes a new instance of ModelEnvironmentDefinitionSpark. + public ModelEnvironmentDefinitionSpark() + { + } + + /// Initializes a new instance of ModelEnvironmentDefinitionSpark. + /// The list of spark repositories. + /// The Spark packages to use. + /// Whether to precache the packages. + internal ModelEnvironmentDefinitionSpark(IList repositories, IList packages, bool? precachePackages) : base(repositories, packages, precachePackages) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.Serialization.cs new file mode 100644 index 000000000000..4bfc3fb026a5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelPythonSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InterpreterPath)) + { + writer.WritePropertyName("interpreterPath"); + writer.WriteStringValue(InterpreterPath); + } + if (Optional.IsDefined(UserManagedDependencies)) + { + writer.WritePropertyName("userManagedDependencies"); + writer.WriteBooleanValue(UserManagedDependencies.Value); + } + if (Optional.IsDefined(CondaDependencies)) + { + writer.WritePropertyName("condaDependencies"); + writer.WriteObjectValue(CondaDependencies); + } + if (Optional.IsDefined(BaseCondaEnvironment)) + { + writer.WritePropertyName("baseCondaEnvironment"); + writer.WriteStringValue(BaseCondaEnvironment); + } + writer.WriteEndObject(); + } + + internal static ModelPythonSection DeserializeModelPythonSection(JsonElement element) + { + Optional interpreterPath = default; + Optional userManagedDependencies = default; + Optional condaDependencies = default; + Optional baseCondaEnvironment = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("interpreterPath")) + { + interpreterPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("userManagedDependencies")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + userManagedDependencies = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("condaDependencies")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + condaDependencies = property.Value.GetObject(); + continue; + } + if (property.NameEquals("baseCondaEnvironment")) + { + baseCondaEnvironment = property.Value.GetString(); + continue; + } + } + return new ModelPythonSection(interpreterPath.Value, Optional.ToNullable(userManagedDependencies), condaDependencies.Value, baseCondaEnvironment.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.cs new file mode 100644 index 000000000000..e546f8a7ef9d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelPythonSection.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ModelPythonSection. + public partial class ModelPythonSection + { + /// Initializes a new instance of ModelPythonSection. + public ModelPythonSection() + { + } + + /// Initializes a new instance of ModelPythonSection. + /// The python interpreter path to use if an environment build is not required. The path specified gets used to call the user script. + /// True means that AzureML reuses an existing python environment; False means that AzureML will create a python environment based on the Conda dependencies specification. + /// A JObject containing Conda dependencies. + /// . + internal ModelPythonSection(string interpreterPath, bool? userManagedDependencies, object condaDependencies, string baseCondaEnvironment) + { + InterpreterPath = interpreterPath; + UserManagedDependencies = userManagedDependencies; + CondaDependencies = condaDependencies; + BaseCondaEnvironment = baseCondaEnvironment; + } + + /// The python interpreter path to use if an environment build is not required. The path specified gets used to call the user script. + public string InterpreterPath { get; set; } + /// True means that AzureML reuses an existing python environment; False means that AzureML will create a python environment based on the Conda dependencies specification. + public bool? UserManagedDependencies { get; set; } + /// A JObject containing Conda dependencies. + public object CondaDependencies { get; set; } + public string BaseCondaEnvironment { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.Serialization.cs new file mode 100644 index 000000000000..8d9e032f714c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelSparkSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Repositories)) + { + writer.WritePropertyName("repositories"); + writer.WriteStartArray(); + foreach (var item in Repositories) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Packages)) + { + writer.WritePropertyName("packages"); + writer.WriteStartArray(); + foreach (var item in Packages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PrecachePackages)) + { + writer.WritePropertyName("precachePackages"); + writer.WriteBooleanValue(PrecachePackages.Value); + } + writer.WriteEndObject(); + } + + internal static ModelSparkSection DeserializeModelSparkSection(JsonElement element) + { + Optional> repositories = default; + Optional> packages = default; + Optional precachePackages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("repositories")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + repositories = array; + continue; + } + if (property.NameEquals("packages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SparkMavenPackage.DeserializeSparkMavenPackage(item)); + } + packages = array; + continue; + } + if (property.NameEquals("precachePackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + precachePackages = property.Value.GetBoolean(); + continue; + } + } + return new ModelSparkSection(Optional.ToList(repositories), Optional.ToList(packages), Optional.ToNullable(precachePackages)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.cs new file mode 100644 index 000000000000..a9a730bf0112 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelSparkSection.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ModelSparkSection. + public partial class ModelSparkSection + { + /// Initializes a new instance of ModelSparkSection. + public ModelSparkSection() + { + Repositories = new ChangeTrackingList(); + Packages = new ChangeTrackingList(); + } + + /// Initializes a new instance of ModelSparkSection. + /// The list of spark repositories. + /// The Spark packages to use. + /// Whether to precache the packages. + internal ModelSparkSection(IList repositories, IList packages, bool? precachePackages) + { + Repositories = repositories; + Packages = packages; + PrecachePackages = precachePackages; + } + + /// The list of spark repositories. + public IList Repositories { get; } + /// The Spark packages to use. + public IList Packages { get; } + /// Whether to precache the packages. + public bool? PrecachePackages { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.Serialization.cs new file mode 100644 index 000000000000..c335b48e8be9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelVersion : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Stage)) + { + writer.WritePropertyName("stage"); + writer.WriteStringValue(Stage); + } + if (Optional.IsDefined(DatastoreId)) + { + writer.WritePropertyName("datastoreId"); + writer.WriteStringValue(DatastoreId); + } + if (Optional.IsDefined(AssetPath)) + { + writer.WritePropertyName("assetPath"); + writer.WriteObjectValue(AssetPath); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static ModelVersion DeserializeModelVersion(JsonElement element) + { + Optional stage = default; + Optional datastoreId = default; + Optional assetPath = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("stage")) + { + stage = property.Value.GetString(); + continue; + } + if (property.NameEquals("datastoreId")) + { + datastoreId = property.Value.GetString(); + continue; + } + if (property.NameEquals("assetPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + assetPath = AssetPath.DeserializeAssetPath(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new ModelVersion(stage.Value, datastoreId.Value, assetPath.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.cs new file mode 100644 index 000000000000..bef488ff547c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersion.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Details of an ModelDto. + public partial class ModelVersion + { + /// Initializes a new instance of ModelVersion. + public ModelVersion() + { + Tags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ModelVersion. + /// Model asset stage. + /// The asset datastoreId. + /// Details of an AssetUri. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + internal ModelVersion(string stage, string datastoreId, AssetPath assetPath, string description, IDictionary tags, IDictionary properties) + { + Stage = stage; + DatastoreId = datastoreId; + AssetPath = assetPath; + Description = description; + Tags = tags; + Properties = properties; + } + + /// Model asset stage. + public string Stage { get; set; } + /// The asset datastoreId. + public string DatastoreId { get; set; } + /// Details of an AssetUri. + public AssetPath AssetPath { get; set; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + /// The asset property dictionary. + public IDictionary Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.Serialization.cs new file mode 100644 index 000000000000..91a9ef43189b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelVersionResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static ModelVersionResource DeserializeModelVersionResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + ModelVersion properties = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = ModelVersion.DeserializeModelVersion(property.Value); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = SystemData.DeserializeSystemData(property.Value); + continue; + } + } + return new ModelVersionResource(id.Value, name.Value, type.Value, properties, systemData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.cs new file mode 100644 index 000000000000..7d0a47729558 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResource.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class ModelVersionResource + { + /// Initializes a new instance of ModelVersionResource. + /// Details of an ModelDto. + /// is null. + public ModelVersionResource(ModelVersion properties) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + Properties = properties; + } + + /// Initializes a new instance of ModelVersionResource. + /// The resource URL of the entity (not URL encoded). + /// The name of the resource entity. + /// The resource provider and type. + /// Details of an ModelDto. + /// Metadata pertaining to creation and last modification of the resource. + internal ModelVersionResource(string id, string name, string type, ModelVersion properties, SystemData systemData) + { + Id = id; + Name = name; + Type = type; + Properties = properties; + SystemData = systemData; + } + + /// The resource URL of the entity (not URL encoded). + public string Id { get; } + /// The name of the resource entity. + public string Name { get; } + /// The resource provider and type. + public string Type { get; } + /// Details of an ModelDto. + public ModelVersion Properties { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs new file mode 100644 index 000000000000..6fa95812ee4c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ModelVersionResourceArmPaginatedResult + { + internal static ModelVersionResourceArmPaginatedResult DeserializeModelVersionResourceArmPaginatedResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ModelVersionResource.DeserializeModelVersionResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ModelVersionResourceArmPaginatedResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs new file mode 100644 index 000000000000..b358dec6365b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A paginated list of ModelVersion entities. + public partial class ModelVersionResourceArmPaginatedResult + { + /// Initializes a new instance of ModelVersionResourceArmPaginatedResult. + internal ModelVersionResourceArmPaginatedResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ModelVersionResourceArmPaginatedResult. + /// An array of objects of type ModelVersion. + /// . + internal ModelVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of objects of type ModelVersion. + public IReadOnlyList Value { get; } + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeState.cs new file mode 100644 index 000000000000..dbd6f47b819d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + public readonly partial struct NodeState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public NodeState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IdleValue = "idle"; + private const string RunningValue = "running"; + private const string PreparingValue = "preparing"; + private const string UnusableValue = "unusable"; + private const string LeavingValue = "leaving"; + private const string PreemptedValue = "preempted"; + + /// idle. + public static NodeState Idle { get; } = new NodeState(IdleValue); + /// running. + public static NodeState Running { get; } = new NodeState(RunningValue); + /// preparing. + public static NodeState Preparing { get; } = new NodeState(PreparingValue); + /// unusable. + public static NodeState Unusable { get; } = new NodeState(UnusableValue); + /// leaving. + public static NodeState Leaving { get; } = new NodeState(LeavingValue); + /// preempted. + public static NodeState Preempted { get; } = new NodeState(PreemptedValue); + /// Determines if two values are the same. + public static bool operator ==(NodeState left, NodeState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NodeState left, NodeState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NodeState(string value) => new NodeState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NodeState other && Equals(other); + /// + public bool Equals(NodeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeStateCounts.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeStateCounts.Serialization.cs new file mode 100644 index 000000000000..2f9126fed837 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeStateCounts.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class NodeStateCounts + { + internal static NodeStateCounts DeserializeNodeStateCounts(JsonElement element) + { + Optional idleNodeCount = default; + Optional runningNodeCount = default; + Optional preparingNodeCount = default; + Optional unusableNodeCount = default; + Optional leavingNodeCount = default; + Optional preemptedNodeCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("idleNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + idleNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runningNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + runningNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("preparingNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + preparingNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("unusableNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unusableNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("leavingNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + leavingNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("preemptedNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + preemptedNodeCount = property.Value.GetInt32(); + continue; + } + } + return new NodeStateCounts(Optional.ToNullable(idleNodeCount), Optional.ToNullable(runningNodeCount), Optional.ToNullable(preparingNodeCount), Optional.ToNullable(unusableNodeCount), Optional.ToNullable(leavingNodeCount), Optional.ToNullable(preemptedNodeCount)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeStateCounts.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeStateCounts.cs new file mode 100644 index 000000000000..1d38c23a25f5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NodeStateCounts.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Counts of various compute node states on the amlCompute. + public partial class NodeStateCounts + { + /// Initializes a new instance of NodeStateCounts. + internal NodeStateCounts() + { + } + + /// Initializes a new instance of NodeStateCounts. + /// Number of compute nodes in idle state. + /// Number of compute nodes which are running jobs. + /// Number of compute nodes which are being prepared. + /// Number of compute nodes which are in unusable state. + /// Number of compute nodes which are leaving the amlCompute. + /// Number of compute nodes which are in preempted state. + internal NodeStateCounts(int? idleNodeCount, int? runningNodeCount, int? preparingNodeCount, int? unusableNodeCount, int? leavingNodeCount, int? preemptedNodeCount) + { + IdleNodeCount = idleNodeCount; + RunningNodeCount = runningNodeCount; + PreparingNodeCount = preparingNodeCount; + UnusableNodeCount = unusableNodeCount; + LeavingNodeCount = leavingNodeCount; + PreemptedNodeCount = preemptedNodeCount; + } + + /// Number of compute nodes in idle state. + public int? IdleNodeCount { get; } + /// Number of compute nodes which are running jobs. + public int? RunningNodeCount { get; } + /// Number of compute nodes which are being prepared. + public int? PreparingNodeCount { get; } + /// Number of compute nodes which are in unusable state. + public int? UnusableNodeCount { get; } + /// Number of compute nodes which are leaving the amlCompute. + public int? LeavingNodeCount { get; } + /// Number of compute nodes which are in preempted state. + public int? PreemptedNodeCount { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookListCredentialsResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookListCredentialsResult.cs new file mode 100644 index 000000000000..efb21b7d7ec4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookListCredentialsResult.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The NotebookListCredentialsResult. + internal partial class NotebookListCredentialsResult + { + /// Initializes a new instance of NotebookListCredentialsResult. + internal NotebookListCredentialsResult() + { + } + + public string PrimaryAccessKey { get; } + public string SecondaryAccessKey { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookPreparationError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookPreparationError.Serialization.cs new file mode 100644 index 000000000000..572edac19ac9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookPreparationError.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class NotebookPreparationError + { + internal static NotebookPreparationError DeserializeNotebookPreparationError(JsonElement element) + { + Optional errorMessage = default; + Optional statusCode = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("errorMessage")) + { + errorMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("statusCode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + statusCode = property.Value.GetInt32(); + continue; + } + } + return new NotebookPreparationError(errorMessage.Value, Optional.ToNullable(statusCode)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookPreparationError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookPreparationError.cs new file mode 100644 index 000000000000..3addb4a40a14 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookPreparationError.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The NotebookPreparationError. + public partial class NotebookPreparationError + { + /// Initializes a new instance of NotebookPreparationError. + internal NotebookPreparationError() + { + } + + /// Initializes a new instance of NotebookPreparationError. + /// . + /// . + internal NotebookPreparationError(string errorMessage, int? statusCode) + { + ErrorMessage = errorMessage; + StatusCode = statusCode; + } + + public string ErrorMessage { get; } + public int? StatusCode { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.Serialization.cs new file mode 100644 index 000000000000..c61e4d91a2b9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class NotebookResourceInfo + { + internal static NotebookResourceInfo DeserializeNotebookResourceInfo(JsonElement element) + { + Optional fqdn = default; + Optional resourceId = default; + Optional notebookPreparationError = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fqdn")) + { + fqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("notebookPreparationError")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + notebookPreparationError = NotebookPreparationError.DeserializeNotebookPreparationError(property.Value); + continue; + } + } + return new NotebookResourceInfo(fqdn.Value, resourceId.Value, notebookPreparationError.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.cs new file mode 100644 index 000000000000..ac3f6dff5483 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/NotebookResourceInfo.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The NotebookResourceInfo. + public partial class NotebookResourceInfo + { + /// Initializes a new instance of NotebookResourceInfo. + internal NotebookResourceInfo() + { + } + + /// Initializes a new instance of NotebookResourceInfo. + /// . + /// the data plane resourceId that used to initialize notebook component. + /// The error that occurs when preparing notebook. + internal NotebookResourceInfo(string fqdn, string resourceId, NotebookPreparationError notebookPreparationError) + { + Fqdn = fqdn; + ResourceId = resourceId; + NotebookPreparationError = notebookPreparationError; + } + + public string Fqdn { get; } + /// the data plane resourceId that used to initialize notebook component. + public string ResourceId { get; } + /// The error that occurs when preparing notebook. + public NotebookPreparationError NotebookPreparationError { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Operation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Operation.Serialization.cs new file mode 100644 index 000000000000..c7dd16af6e9a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Operation.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Operation + { + internal static Operation DeserializeOperation(JsonElement element) + { + Optional name = default; + Optional display = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("display")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + display = OperationDisplay.DeserializeOperationDisplay(property.Value); + continue; + } + } + return new Operation(name.Value, display.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Operation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Operation.cs new file mode 100644 index 000000000000..67c635369d62 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Operation.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Machine Learning workspace REST API operation. + public partial class Operation + { + /// Initializes a new instance of Operation. + internal Operation() + { + } + + /// Initializes a new instance of Operation. + /// Operation name: {provider}/{resource}/{operation}. + /// Display name of operation. + internal Operation(string name, OperationDisplay display) + { + Name = name; + Display = display; + } + + /// Operation name: {provider}/{resource}/{operation}. + public string Name { get; } + /// Display name of operation. + public OperationDisplay Display { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationDisplay.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationDisplay.Serialization.cs new file mode 100644 index 000000000000..3304e99c0e2a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationDisplay.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class OperationDisplay + { + internal static OperationDisplay DeserializeOperationDisplay(JsonElement element) + { + Optional provider = default; + Optional resource = default; + Optional operation = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provider")) + { + provider = property.Value.GetString(); + continue; + } + if (property.NameEquals("resource")) + { + resource = property.Value.GetString(); + continue; + } + if (property.NameEquals("operation")) + { + operation = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + } + return new OperationDisplay(provider.Value, resource.Value, operation.Value, description.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationDisplay.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationDisplay.cs new file mode 100644 index 000000000000..6a21e4f9b468 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationDisplay.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Display name of operation. + public partial class OperationDisplay + { + /// Initializes a new instance of OperationDisplay. + internal OperationDisplay() + { + } + + /// Initializes a new instance of OperationDisplay. + /// The resource provider name: Microsoft.MachineLearningExperimentation. + /// The resource on which the operation is performed. + /// The operation that users can perform. + /// The description for the operation. + internal OperationDisplay(string provider, string resource, string operation, string description) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + } + + /// The resource provider name: Microsoft.MachineLearningExperimentation. + public string Provider { get; } + /// The resource on which the operation is performed. + public string Resource { get; } + /// The operation that users can perform. + public string Operation { get; } + /// The description for the operation. + public string Description { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationListResult.Serialization.cs new file mode 100644 index 000000000000..aaa3824258fd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationListResult.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class OperationListResult + { + internal static OperationListResult DeserializeOperationListResult(JsonElement element) + { + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Operation.DeserializeOperation(item)); + } + value = array; + continue; + } + } + return new OperationListResult(Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationListResult.cs new file mode 100644 index 000000000000..5cebdabb93c3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationListResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// An array of operations supported by the resource provider. + public partial class OperationListResult + { + /// Initializes a new instance of OperationListResult. + internal OperationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of OperationListResult. + /// List of AML workspace operations supported by the AML workspace resource provider. + internal OperationListResult(IReadOnlyList value) + { + Value = value; + } + + /// List of AML workspace operations supported by the AML workspace resource provider. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationName.cs new file mode 100644 index 000000000000..bdb8b8f29edc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationName.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Name of the last operation. + public readonly partial struct OperationName : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public OperationName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreateValue = "Create"; + private const string StartValue = "Start"; + private const string StopValue = "Stop"; + private const string RestartValue = "Restart"; + private const string ReimageValue = "Reimage"; + private const string DeleteValue = "Delete"; + + /// Create. + public static OperationName Create { get; } = new OperationName(CreateValue); + /// Start. + public static OperationName Start { get; } = new OperationName(StartValue); + /// Stop. + public static OperationName Stop { get; } = new OperationName(StopValue); + /// Restart. + public static OperationName Restart { get; } = new OperationName(RestartValue); + /// Reimage. + public static OperationName Reimage { get; } = new OperationName(ReimageValue); + /// Delete. + public static OperationName Delete { get; } = new OperationName(DeleteValue); + /// Determines if two values are the same. + public static bool operator ==(OperationName left, OperationName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OperationName left, OperationName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OperationName(string value) => new OperationName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OperationName other && Equals(other); + /// + public bool Equals(OperationName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationStatus.cs new file mode 100644 index 000000000000..fced1ae3db57 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OperationStatus.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Operation status. + public readonly partial struct OperationStatus : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public OperationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InProgressValue = "InProgress"; + private const string SucceededValue = "Succeeded"; + private const string CreateFailedValue = "CreateFailed"; + private const string StartFailedValue = "StartFailed"; + private const string StopFailedValue = "StopFailed"; + private const string RestartFailedValue = "RestartFailed"; + private const string ReimageFailedValue = "ReimageFailed"; + private const string DeleteFailedValue = "DeleteFailed"; + + /// InProgress. + public static OperationStatus InProgress { get; } = new OperationStatus(InProgressValue); + /// Succeeded. + public static OperationStatus Succeeded { get; } = new OperationStatus(SucceededValue); + /// CreateFailed. + public static OperationStatus CreateFailed { get; } = new OperationStatus(CreateFailedValue); + /// StartFailed. + public static OperationStatus StartFailed { get; } = new OperationStatus(StartFailedValue); + /// StopFailed. + public static OperationStatus StopFailed { get; } = new OperationStatus(StopFailedValue); + /// RestartFailed. + public static OperationStatus RestartFailed { get; } = new OperationStatus(RestartFailedValue); + /// ReimageFailed. + public static OperationStatus ReimageFailed { get; } = new OperationStatus(ReimageFailedValue); + /// DeleteFailed. + public static OperationStatus DeleteFailed { get; } = new OperationStatus(DeleteFailedValue); + /// Determines if two values are the same. + public static bool operator ==(OperationStatus left, OperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OperationStatus left, OperationStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OperationStatus(string value) => new OperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OperationStatus other && Equals(other); + /// + public bool Equals(OperationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OrderString.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OrderString.cs new file mode 100644 index 000000000000..c54c012334bc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OrderString.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The OrderString. + public readonly partial struct OrderString : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public OrderString(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedAtDescValue = "CreatedAtDesc"; + private const string CreatedAtAscValue = "CreatedAtAsc"; + private const string UpdatedAtDescValue = "UpdatedAtDesc"; + private const string UpdatedAtAscValue = "UpdatedAtAsc"; + + /// CreatedAtDesc. + public static OrderString CreatedAtDesc { get; } = new OrderString(CreatedAtDescValue); + /// CreatedAtAsc. + public static OrderString CreatedAtAsc { get; } = new OrderString(CreatedAtAscValue); + /// UpdatedAtDesc. + public static OrderString UpdatedAtDesc { get; } = new OrderString(UpdatedAtDescValue); + /// UpdatedAtAsc. + public static OrderString UpdatedAtAsc { get; } = new OrderString(UpdatedAtAscValue); + /// Determines if two values are the same. + public static bool operator ==(OrderString left, OrderString right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OrderString left, OrderString right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OrderString(string value) => new OrderString(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OrderString other && Equals(other); + /// + public bool Equals(OrderString other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OriginType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OriginType.cs new file mode 100644 index 000000000000..9c934681e8d7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OriginType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Type of the linked service. + public readonly partial struct OriginType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public OriginType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SynapseValue = "Synapse"; + + /// Synapse. + public static OriginType Synapse { get; } = new OriginType(SynapseValue); + /// Determines if two values are the same. + public static bool operator ==(OriginType left, OriginType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OriginType left, OriginType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OriginType(string value) => new OriginType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OriginType other && Equals(other); + /// + public bool Equals(OriginType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OsType.cs new file mode 100644 index 000000000000..bacfc64c8c98 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/OsType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Compute OS Type. + public readonly partial struct OsType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public OsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "Linux"; + private const string WindowsValue = "Windows"; + + /// Linux. + public static OsType Linux { get; } = new OsType(LinuxValue); + /// Windows. + public static OsType Windows { get; } = new OsType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(OsType left, OsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OsType left, OsType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OsType(string value) => new OsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OsType other && Equals(other); + /// + public bool Equals(OsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedComputeResourcesList.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedComputeResourcesList.Serialization.cs new file mode 100644 index 000000000000..608ad12b82a0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedComputeResourcesList.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PaginatedComputeResourcesList + { + internal static PaginatedComputeResourcesList DeserializePaginatedComputeResourcesList(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ComputeResource.DeserializeComputeResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new PaginatedComputeResourcesList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedComputeResourcesList.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedComputeResourcesList.cs new file mode 100644 index 000000000000..9f59d6fbdc33 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedComputeResourcesList.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. + public partial class PaginatedComputeResourcesList + { + /// Initializes a new instance of PaginatedComputeResourcesList. + internal PaginatedComputeResourcesList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PaginatedComputeResourcesList. + /// An array of Machine Learning compute objects wrapped in ARM resource envelope. + /// A continuation link (absolute URI) to the next page of results in the list. + internal PaginatedComputeResourcesList(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of Machine Learning compute objects wrapped in ARM resource envelope. + public IReadOnlyList Value { get; } + /// A continuation link (absolute URI) to the next page of results in the list. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.Serialization.cs new file mode 100644 index 000000000000..dc06b03a11a3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PaginatedServiceList + { + internal static PaginatedServiceList DeserializePaginatedServiceList(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceResource.DeserializeServiceResource(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new PaginatedServiceList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.cs new file mode 100644 index 000000000000..a04f59c27e2f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedServiceList.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Paginated list of Machine Learning service objects wrapped in ARM resource envelope. + public partial class PaginatedServiceList + { + /// Initializes a new instance of PaginatedServiceList. + internal PaginatedServiceList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PaginatedServiceList. + /// An array of Machine Learning compute objects wrapped in ARM resource envelope. + /// A continuation link (absolute URI) to the next page of results in the list. + internal PaginatedServiceList(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of Machine Learning compute objects wrapped in ARM resource envelope. + public IReadOnlyList Value { get; } + /// A continuation link (absolute URI) to the next page of results in the list. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedWorkspaceConnectionsList.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedWorkspaceConnectionsList.Serialization.cs new file mode 100644 index 000000000000..0a8dd6ee648d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedWorkspaceConnectionsList.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PaginatedWorkspaceConnectionsList + { + internal static PaginatedWorkspaceConnectionsList DeserializePaginatedWorkspaceConnectionsList(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkspaceConnection.DeserializeWorkspaceConnection(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new PaginatedWorkspaceConnectionsList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedWorkspaceConnectionsList.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedWorkspaceConnectionsList.cs new file mode 100644 index 000000000000..0fa194d707b8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PaginatedWorkspaceConnectionsList.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Paginated list of Workspace connection objects. + public partial class PaginatedWorkspaceConnectionsList + { + /// Initializes a new instance of PaginatedWorkspaceConnectionsList. + internal PaginatedWorkspaceConnectionsList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PaginatedWorkspaceConnectionsList. + /// An array of Workspace connection objects. + /// A continuation link (absolute URI) to the next page of results in the list. + internal PaginatedWorkspaceConnectionsList(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// An array of Workspace connection objects. + public IReadOnlyList Value { get; } + /// A continuation link (absolute URI) to the next page of results in the list. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.Serialization.cs new file mode 100644 index 000000000000..3a95dfbb9dd9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ParameterSamplingConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("parameterSpace"); + writer.WriteObjectValue(ParameterSpace); + writer.WritePropertyName("samplingType"); + writer.WriteStringValue(SamplingType.ToString()); + writer.WriteEndObject(); + } + + internal static ParameterSamplingConfiguration DeserializeParameterSamplingConfiguration(JsonElement element) + { + object parameterSpace = default; + ParameterSamplingType samplingType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parameterSpace")) + { + parameterSpace = property.Value.GetObject(); + continue; + } + if (property.NameEquals("samplingType")) + { + samplingType = new ParameterSamplingType(property.Value.GetString()); + continue; + } + } + return new ParameterSamplingConfiguration(parameterSpace, samplingType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.cs new file mode 100644 index 000000000000..d2a2c8d2d129 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingConfiguration.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// class for all hyperparameter sampling algorithms. + public partial class ParameterSamplingConfiguration + { + /// Initializes a new instance of ParameterSamplingConfiguration. + /// A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. + /// Type of the hyperparameter sampling algorithms. + /// is null. + public ParameterSamplingConfiguration(object parameterSpace, ParameterSamplingType samplingType) + { + if (parameterSpace == null) + { + throw new ArgumentNullException(nameof(parameterSpace)); + } + + ParameterSpace = parameterSpace; + SamplingType = samplingType; + } + + /// A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. + public object ParameterSpace { get; set; } + /// Type of the hyperparameter sampling algorithms. + public ParameterSamplingType SamplingType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingType.cs new file mode 100644 index 000000000000..88e26d6ab6a3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ParameterSamplingType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Type of the hyperparameter sampling algorithms. + public readonly partial struct ParameterSamplingType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ParameterSamplingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GridValue = "Grid"; + private const string RandomValue = "Random"; + private const string BayesianValue = "Bayesian"; + + /// Grid. + public static ParameterSamplingType Grid { get; } = new ParameterSamplingType(GridValue); + /// Random. + public static ParameterSamplingType Random { get; } = new ParameterSamplingType(RandomValue); + /// Bayesian. + public static ParameterSamplingType Bayesian { get; } = new ParameterSamplingType(BayesianValue); + /// Determines if two values are the same. + public static bool operator ==(ParameterSamplingType left, ParameterSamplingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ParameterSamplingType left, ParameterSamplingType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ParameterSamplingType(string value) => new ParameterSamplingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ParameterSamplingType other && Equals(other); + /// + public bool Equals(ParameterSamplingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Password.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Password.Serialization.cs new file mode 100644 index 000000000000..1fe3d8cec43d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Password.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Password + { + internal static Password DeserializePassword(JsonElement element) + { + Optional name = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + } + return new Password(name.Value, value.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Password.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Password.cs new file mode 100644 index 000000000000..775121968775 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Password.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Password. + public partial class Password + { + /// Initializes a new instance of Password. + internal Password() + { + } + + /// Initializes a new instance of Password. + /// . + /// . + internal Password(string name, string value) + { + Name = name; + Value = value; + } + + public string Name { get; } + public string Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PersonalComputeInstanceSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PersonalComputeInstanceSettings.Serialization.cs new file mode 100644 index 000000000000..80505e50b8b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PersonalComputeInstanceSettings.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PersonalComputeInstanceSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AssignedUser)) + { + writer.WritePropertyName("assignedUser"); + writer.WriteObjectValue(AssignedUser); + } + writer.WriteEndObject(); + } + + internal static PersonalComputeInstanceSettings DeserializePersonalComputeInstanceSettings(JsonElement element) + { + Optional assignedUser = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assignedUser")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + assignedUser = AssignedUser.DeserializeAssignedUser(property.Value); + continue; + } + } + return new PersonalComputeInstanceSettings(assignedUser.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PersonalComputeInstanceSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PersonalComputeInstanceSettings.cs new file mode 100644 index 000000000000..cb7da76ae3bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PersonalComputeInstanceSettings.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Settings for a personal compute instance. + public partial class PersonalComputeInstanceSettings + { + /// Initializes a new instance of PersonalComputeInstanceSettings. + public PersonalComputeInstanceSettings() + { + } + + /// Initializes a new instance of PersonalComputeInstanceSettings. + /// A user explicitly assigned to a personal compute instance. + internal PersonalComputeInstanceSettings(AssignedUser assignedUser) + { + AssignedUser = assignedUser; + } + + /// A user explicitly assigned to a personal compute instance. + public AssignedUser AssignedUser { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrimaryMetricGoal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrimaryMetricGoal.cs new file mode 100644 index 000000000000..019f722b3568 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrimaryMetricGoal.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Defines supported metric goals for hyperparameter tuning. + public readonly partial struct PrimaryMetricGoal : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public PrimaryMetricGoal(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MinimizeValue = "Minimize"; + private const string MaximizeValue = "Maximize"; + + /// Minimize. + public static PrimaryMetricGoal Minimize { get; } = new PrimaryMetricGoal(MinimizeValue); + /// Maximize. + public static PrimaryMetricGoal Maximize { get; } = new PrimaryMetricGoal(MaximizeValue); + /// Determines if two values are the same. + public static bool operator ==(PrimaryMetricGoal left, PrimaryMetricGoal right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PrimaryMetricGoal left, PrimaryMetricGoal right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PrimaryMetricGoal(string value) => new PrimaryMetricGoal(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PrimaryMetricGoal other && Equals(other); + /// + public bool Equals(PrimaryMetricGoal other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.Serialization.cs new file mode 100644 index 000000000000..876049d1bad3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PrivateEndpoint : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static PrivateEndpoint DeserializePrivateEndpoint(JsonElement element) + { + Optional id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + } + return new PrivateEndpoint(id.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.cs new file mode 100644 index 000000000000..8e8788bf324d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpoint.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Private Endpoint resource. + public partial class PrivateEndpoint + { + /// Initializes a new instance of PrivateEndpoint. + public PrivateEndpoint() + { + } + + /// Initializes a new instance of PrivateEndpoint. + /// The ARM identifier for Private Endpoint. + internal PrivateEndpoint(string id) + { + Id = id; + } + + /// The ARM identifier for Private Endpoint. + public string Id { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.Serialization.cs new file mode 100644 index 000000000000..c51dd5d671c8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PrivateEndpointConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(PrivateEndpoint)) + { + writer.WritePropertyName("privateEndpoint"); + writer.WriteObjectValue(PrivateEndpoint); + } + if (Optional.IsDefined(PrivateLinkServiceConnectionState)) + { + writer.WritePropertyName("privateLinkServiceConnectionState"); + writer.WriteObjectValue(PrivateLinkServiceConnectionState); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static PrivateEndpointConnection DeserializePrivateEndpointConnection(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional identity = default; + Optional location = default; + Optional type = default; + Optional> tags = default; + Optional sku = default; + Optional privateEndpoint = default; + Optional privateLinkServiceConnectionState = default; + Optional provisioningState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = Identity.DeserializeIdentity(property.Value); + continue; + } + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = Sku.DeserializeSku(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("privateEndpoint")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value); + continue; + } + if (property0.NameEquals("privateLinkServiceConnectionState")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value); + continue; + } + if (property0.NameEquals("provisioningState")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new PrivateEndpointConnectionProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new PrivateEndpointConnection(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, privateEndpoint.Value, privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.cs new file mode 100644 index 000000000000..7b3fc9392233 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnection.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Private Endpoint Connection resource. + public partial class PrivateEndpointConnection : Resource + { + /// Initializes a new instance of PrivateEndpointConnection. + public PrivateEndpointConnection() + { + } + + /// Initializes a new instance of PrivateEndpointConnection. + /// Specifies the resource ID. + /// Specifies the name of the resource. + /// The identity of the resource. + /// Specifies the location of the resource. + /// Specifies the type of the resource. + /// Contains resource tags defined as key/value pairs. + /// The sku of the workspace. + /// The resource of private end point. + /// A collection of information about the state of the connection between service consumer and provider. + /// The provisioning state of the private endpoint connection resource. + internal PrivateEndpointConnection(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, PrivateEndpoint privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState? provisioningState) : base(id, name, identity, location, type, tags, sku) + { + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + ProvisioningState = provisioningState; + } + + /// The resource of private end point. + public PrivateEndpoint PrivateEndpoint { get; set; } + /// A collection of information about the state of the connection between service consumer and provider. + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + /// The provisioning state of the private endpoint connection resource. + public PrivateEndpointConnectionProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs new file mode 100644 index 000000000000..4652fa685db2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The current provisioning state. + public readonly partial struct PrivateEndpointConnectionProvisioningState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public PrivateEndpointConnectionProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string CreatingValue = "Creating"; + private const string DeletingValue = "Deleting"; + private const string FailedValue = "Failed"; + + /// Succeeded. + public static PrivateEndpointConnectionProvisioningState Succeeded { get; } = new PrivateEndpointConnectionProvisioningState(SucceededValue); + /// Creating. + public static PrivateEndpointConnectionProvisioningState Creating { get; } = new PrivateEndpointConnectionProvisioningState(CreatingValue); + /// Deleting. + public static PrivateEndpointConnectionProvisioningState Deleting { get; } = new PrivateEndpointConnectionProvisioningState(DeletingValue); + /// Failed. + public static PrivateEndpointConnectionProvisioningState Failed { get; } = new PrivateEndpointConnectionProvisioningState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(PrivateEndpointConnectionProvisioningState left, PrivateEndpointConnectionProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PrivateEndpointConnectionProvisioningState left, PrivateEndpointConnectionProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PrivateEndpointConnectionProvisioningState(string value) => new PrivateEndpointConnectionProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PrivateEndpointConnectionProvisioningState other && Equals(other); + /// + public bool Equals(PrivateEndpointConnectionProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs new file mode 100644 index 000000000000..a0eb5028a085 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The private endpoint connection status. + public readonly partial struct PrivateEndpointServiceConnectionStatus : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public PrivateEndpointServiceConnectionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string ApprovedValue = "Approved"; + private const string RejectedValue = "Rejected"; + private const string DisconnectedValue = "Disconnected"; + private const string TimeoutValue = "Timeout"; + + /// Pending. + public static PrivateEndpointServiceConnectionStatus Pending { get; } = new PrivateEndpointServiceConnectionStatus(PendingValue); + /// Approved. + public static PrivateEndpointServiceConnectionStatus Approved { get; } = new PrivateEndpointServiceConnectionStatus(ApprovedValue); + /// Rejected. + public static PrivateEndpointServiceConnectionStatus Rejected { get; } = new PrivateEndpointServiceConnectionStatus(RejectedValue); + /// Disconnected. + public static PrivateEndpointServiceConnectionStatus Disconnected { get; } = new PrivateEndpointServiceConnectionStatus(DisconnectedValue); + /// Timeout. + public static PrivateEndpointServiceConnectionStatus Timeout { get; } = new PrivateEndpointServiceConnectionStatus(TimeoutValue); + /// Determines if two values are the same. + public static bool operator ==(PrivateEndpointServiceConnectionStatus left, PrivateEndpointServiceConnectionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PrivateEndpointServiceConnectionStatus left, PrivateEndpointServiceConnectionStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PrivateEndpointServiceConnectionStatus(string value) => new PrivateEndpointServiceConnectionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PrivateEndpointServiceConnectionStatus other && Equals(other); + /// + public bool Equals(PrivateEndpointServiceConnectionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.Serialization.cs new file mode 100644 index 000000000000..d11e9d85eac2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.Serialization.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PrivateLinkResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(RequiredZoneNames)) + { + writer.WritePropertyName("requiredZoneNames"); + writer.WriteStartArray(); + foreach (var item in RequiredZoneNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static PrivateLinkResource DeserializePrivateLinkResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional identity = default; + Optional location = default; + Optional type = default; + Optional> tags = default; + Optional sku = default; + Optional groupId = default; + Optional> requiredMembers = default; + Optional> requiredZoneNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = Identity.DeserializeIdentity(property.Value); + continue; + } + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = Sku.DeserializeSku(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("groupId")) + { + groupId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("requiredMembers")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredMembers = array; + continue; + } + if (property0.NameEquals("requiredZoneNames")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredZoneNames = array; + continue; + } + } + continue; + } + } + return new PrivateLinkResource(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, groupId.Value, Optional.ToList(requiredMembers), Optional.ToList(requiredZoneNames)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.cs new file mode 100644 index 000000000000..d64fb7064738 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResource.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A private link resource. + public partial class PrivateLinkResource : Resource + { + /// Initializes a new instance of PrivateLinkResource. + public PrivateLinkResource() + { + RequiredMembers = new ChangeTrackingList(); + RequiredZoneNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of PrivateLinkResource. + /// Specifies the resource ID. + /// Specifies the name of the resource. + /// The identity of the resource. + /// Specifies the location of the resource. + /// Specifies the type of the resource. + /// Contains resource tags defined as key/value pairs. + /// The sku of the workspace. + /// The private link resource group id. + /// The private link resource required member names. + /// The private link resource Private link DNS zone name. + internal PrivateLinkResource(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames) : base(id, name, identity, location, type, tags, sku) + { + GroupId = groupId; + RequiredMembers = requiredMembers; + RequiredZoneNames = requiredZoneNames; + } + + /// The private link resource group id. + public string GroupId { get; } + /// The private link resource required member names. + public IReadOnlyList RequiredMembers { get; } + /// The private link resource Private link DNS zone name. + public IList RequiredZoneNames { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResourceListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResourceListResult.Serialization.cs new file mode 100644 index 000000000000..9bf2756d1215 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResourceListResult.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PrivateLinkResourceListResult + { + internal static PrivateLinkResourceListResult DeserializePrivateLinkResourceListResult(JsonElement element) + { + Optional> value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PrivateLinkResource.DeserializePrivateLinkResource(item)); + } + value = array; + continue; + } + } + return new PrivateLinkResourceListResult(Optional.ToList(value)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResourceListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResourceListResult.cs new file mode 100644 index 000000000000..01ee595b7595 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkResourceListResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A list of private link resources. + public partial class PrivateLinkResourceListResult + { + /// Initializes a new instance of PrivateLinkResourceListResult. + internal PrivateLinkResourceListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PrivateLinkResourceListResult. + /// Array of private link resources. + internal PrivateLinkResourceListResult(IReadOnlyList value) + { + Value = value; + } + + /// Array of private link resources. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkServiceConnectionState.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkServiceConnectionState.Serialization.cs new file mode 100644 index 000000000000..6f844d5cc42d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkServiceConnectionState.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class PrivateLinkServiceConnectionState : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ActionsRequired)) + { + writer.WritePropertyName("actionsRequired"); + writer.WriteStringValue(ActionsRequired); + } + writer.WriteEndObject(); + } + + internal static PrivateLinkServiceConnectionState DeserializePrivateLinkServiceConnectionState(JsonElement element) + { + Optional status = default; + Optional description = default; + Optional actionsRequired = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new PrivateEndpointServiceConnectionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("actionsRequired")) + { + actionsRequired = property.Value.GetString(); + continue; + } + } + return new PrivateLinkServiceConnectionState(Optional.ToNullable(status), description.Value, actionsRequired.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkServiceConnectionState.cs new file mode 100644 index 000000000000..994e6798af9c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/PrivateLinkServiceConnectionState.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A collection of information about the state of the connection between service consumer and provider. + public partial class PrivateLinkServiceConnectionState + { + /// Initializes a new instance of PrivateLinkServiceConnectionState. + public PrivateLinkServiceConnectionState() + { + } + + /// Initializes a new instance of PrivateLinkServiceConnectionState. + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// The reason for approval/rejection of the connection. + /// A message indicating if changes on the service provider require any updates on the consumer. + internal PrivateLinkServiceConnectionState(PrivateEndpointServiceConnectionStatus? status, string description, string actionsRequired) + { + Status = status; + Description = description; + ActionsRequired = actionsRequired; + } + + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + public PrivateEndpointServiceConnectionStatus? Status { get; set; } + /// The reason for approval/rejection of the connection. + public string Description { get; set; } + /// A message indicating if changes on the service provider require any updates on the consumer. + public string ActionsRequired { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.Serialization.cs new file mode 100644 index 000000000000..a815b31dd22e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ProgressMetrics : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static ProgressMetrics DeserializeProgressMetrics(JsonElement element) + { + Optional totalDatapointCount = default; + Optional completedDatapointCount = default; + Optional skippedDatapointCount = default; + Optional incrementalDatasetLastRefreshTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalDatapointCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + totalDatapointCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("completedDatapointCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + completedDatapointCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("skippedDatapointCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + skippedDatapointCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("incrementalDatasetLastRefreshTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + incrementalDatasetLastRefreshTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ProgressMetrics(Optional.ToNullable(totalDatapointCount), Optional.ToNullable(completedDatapointCount), Optional.ToNullable(skippedDatapointCount), Optional.ToNullable(incrementalDatasetLastRefreshTime)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.cs new file mode 100644 index 000000000000..a541e3bbc3b7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProgressMetrics.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Progress metrics definition. + public partial class ProgressMetrics + { + /// Initializes a new instance of ProgressMetrics. + public ProgressMetrics() + { + } + + /// Initializes a new instance of ProgressMetrics. + /// The total datapoint count. + /// The completed datapoint count. + /// The skipped datapoint count. + /// The time of last successful incremental dataset refresh in UTC. + internal ProgressMetrics(long? totalDatapointCount, long? completedDatapointCount, long? skippedDatapointCount, DateTimeOffset? incrementalDatasetLastRefreshTime) + { + TotalDatapointCount = totalDatapointCount; + CompletedDatapointCount = completedDatapointCount; + SkippedDatapointCount = skippedDatapointCount; + IncrementalDatasetLastRefreshTime = incrementalDatasetLastRefreshTime; + } + + /// The total datapoint count. + public long? TotalDatapointCount { get; } + /// The completed datapoint count. + public long? CompletedDatapointCount { get; } + /// The skipped datapoint count. + public long? SkippedDatapointCount { get; } + /// The time of last successful incremental dataset refresh in UTC. + public DateTimeOffset? IncrementalDatasetLastRefreshTime { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..e4d49c68db4e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string UpdatingValue = "Updating"; + private const string CreatingValue = "Creating"; + private const string DeletingValue = "Deleting"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Unknown. + public static ProvisioningState Unknown { get; } = new ProvisioningState(UnknownValue); + /// Updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// Creating. + public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); + /// Deleting. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// Succeeded. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaBaseProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaBaseProperties.Serialization.cs new file mode 100644 index 000000000000..181d7826239a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaBaseProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class QuotaBaseProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Limit)) + { + writer.WritePropertyName("limit"); + writer.WriteNumberValue(Limit.Value); + } + if (Optional.IsDefined(Unit)) + { + writer.WritePropertyName("unit"); + writer.WriteStringValue(Unit.Value.ToString()); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaBaseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaBaseProperties.cs new file mode 100644 index 000000000000..9c83d779ce8e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaBaseProperties.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The properties for Quota update or retrieval. + public partial class QuotaBaseProperties + { + /// Initializes a new instance of QuotaBaseProperties. + public QuotaBaseProperties() + { + } + + /// Specifies the resource ID. + public string Id { get; set; } + /// Specifies the resource type. + public string Type { get; set; } + /// The maximum permitted quota of the resource. + public long? Limit { get; set; } + /// An enum describing the unit of quota measurement. + public QuotaUnit? Unit { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUnit.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUnit.cs new file mode 100644 index 000000000000..e6df90fc88bb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUnit.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// An enum describing the unit of quota measurement. + public readonly partial struct QuotaUnit : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public QuotaUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CountValue = "Count"; + + /// Count. + public static QuotaUnit Count { get; } = new QuotaUnit(CountValue); + /// Determines if two values are the same. + public static bool operator ==(QuotaUnit left, QuotaUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(QuotaUnit left, QuotaUnit right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator QuotaUnit(string value) => new QuotaUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is QuotaUnit other && Equals(other); + /// + public bool Equals(QuotaUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUpdateParameters.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUpdateParameters.Serialization.cs new file mode 100644 index 000000000000..e241fb83d203 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUpdateParameters.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class QuotaUpdateParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUpdateParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUpdateParameters.cs new file mode 100644 index 000000000000..4fc9b9773a15 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/QuotaUpdateParameters.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Quota update parameters. + public partial class QuotaUpdateParameters + { + /// Initializes a new instance of QuotaUpdateParameters. + public QuotaUpdateParameters() + { + Value = new ChangeTrackingList(); + } + + /// The list for update quota. + public IList Value { get; } + /// Region of workspace quota to be updated. + public string Location { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.Serialization.cs new file mode 100644 index 000000000000..8260538525bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class RCranPackage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Repository)) + { + writer.WritePropertyName("repository"); + writer.WriteStringValue(Repository); + } + writer.WriteEndObject(); + } + + internal static RCranPackage DeserializeRCranPackage(JsonElement element) + { + Optional name = default; + Optional repository = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("repository")) + { + repository = property.Value.GetString(); + continue; + } + } + return new RCranPackage(name.Value, repository.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.cs new file mode 100644 index 000000000000..e0056b62d101 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RCranPackage.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The RCranPackage. + public partial class RCranPackage + { + /// Initializes a new instance of RCranPackage. + public RCranPackage() + { + } + + /// Initializes a new instance of RCranPackage. + /// The package name. + /// The repository name. + internal RCranPackage(string name, string repository) + { + Name = name; + Repository = repository; + } + + /// The package name. + public string Name { get; set; } + /// The repository name. + public string Repository { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.Serialization.cs new file mode 100644 index 000000000000..7cd72ad890bd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class RGitHubPackage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Repository)) + { + writer.WritePropertyName("repository"); + writer.WriteStringValue(Repository); + } + if (Optional.IsDefined(AuthToken)) + { + writer.WritePropertyName("authToken"); + writer.WriteStringValue(AuthToken); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.cs new file mode 100644 index 000000000000..335557330c9c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackage.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The RGitHubPackage. + public partial class RGitHubPackage + { + /// Initializes a new instance of RGitHubPackage. + public RGitHubPackage() + { + } + + /// Repository address in the format username/repo[/subdir][@ref|#pull]. + public string Repository { get; set; } + /// Personal access token to install from a private repo. + public string AuthToken { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.Serialization.cs new file mode 100644 index 000000000000..0f1248ffb60a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class RGitHubPackageResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Repository)) + { + writer.WritePropertyName("repository"); + writer.WriteStringValue(Repository); + } + writer.WriteEndObject(); + } + + internal static RGitHubPackageResponse DeserializeRGitHubPackageResponse(JsonElement element) + { + Optional repository = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("repository")) + { + repository = property.Value.GetString(); + continue; + } + } + return new RGitHubPackageResponse(repository.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.cs new file mode 100644 index 000000000000..e84b50dd34ad --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RGitHubPackageResponse.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The RGitHubPackageResponse. + public partial class RGitHubPackageResponse + { + /// Initializes a new instance of RGitHubPackageResponse. + public RGitHubPackageResponse() + { + } + + /// Initializes a new instance of RGitHubPackageResponse. + /// Repository address in the format username/repo[/subdir][@ref|#pull]. + internal RGitHubPackageResponse(string repository) + { + Repository = repository; + } + + /// Repository address in the format username/repo[/subdir][@ref|#pull]. + public string Repository { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.Serialization.cs new file mode 100644 index 000000000000..d9b2991e3630 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class RSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RVersion)) + { + writer.WritePropertyName("rVersion"); + writer.WriteStringValue(RVersion); + } + if (Optional.IsDefined(UserManaged)) + { + writer.WritePropertyName("userManaged"); + writer.WriteBooleanValue(UserManaged.Value); + } + if (Optional.IsDefined(RscriptPath)) + { + writer.WritePropertyName("rscriptPath"); + writer.WriteStringValue(RscriptPath); + } + if (Optional.IsDefined(SnapshotDate)) + { + writer.WritePropertyName("snapshotDate"); + writer.WriteStringValue(SnapshotDate); + } + if (Optional.IsCollectionDefined(CranPackages)) + { + writer.WritePropertyName("cranPackages"); + writer.WriteStartArray(); + foreach (var item in CranPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(GitHubPackages)) + { + writer.WritePropertyName("gitHubPackages"); + writer.WriteStartArray(); + foreach (var item in GitHubPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(CustomUrlPackages)) + { + writer.WritePropertyName("customUrlPackages"); + writer.WriteStartArray(); + foreach (var item in CustomUrlPackages) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BioConductorPackages)) + { + writer.WritePropertyName("bioConductorPackages"); + writer.WriteStartArray(); + foreach (var item in BioConductorPackages) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.cs new file mode 100644 index 000000000000..8d7109762f4d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSection.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The RSection. + public partial class RSection + { + /// Initializes a new instance of RSection. + public RSection() + { + CranPackages = new ChangeTrackingList(); + GitHubPackages = new ChangeTrackingList(); + CustomUrlPackages = new ChangeTrackingList(); + BioConductorPackages = new ChangeTrackingList(); + } + + /// The version of R to be installed. + public string RVersion { get; set; } + /// Indicates whether the environment is managed by user or by AzureML. + public bool? UserManaged { get; set; } + /// + /// The Rscript path to use if an environment build is not required. + /// + /// The path specified gets used to call the user script. + /// + public string RscriptPath { get; set; } + /// Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". + public string SnapshotDate { get; set; } + /// The CRAN packages to use. + public IList CranPackages { get; } + /// The packages directly from GitHub. + public IList GitHubPackages { get; } + /// The packages from custom urls. + public IList CustomUrlPackages { get; } + /// The packages from Bioconductor. + public IList BioConductorPackages { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.Serialization.cs new file mode 100644 index 000000000000..02a6ef207417 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class RSectionResponse : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RVersion)) + { + writer.WritePropertyName("rVersion"); + writer.WriteStringValue(RVersion); + } + if (Optional.IsDefined(UserManaged)) + { + writer.WritePropertyName("userManaged"); + writer.WriteBooleanValue(UserManaged.Value); + } + if (Optional.IsDefined(RscriptPath)) + { + writer.WritePropertyName("rscriptPath"); + writer.WriteStringValue(RscriptPath); + } + if (Optional.IsDefined(SnapshotDate)) + { + writer.WritePropertyName("snapshotDate"); + writer.WriteStringValue(SnapshotDate); + } + if (Optional.IsCollectionDefined(CranPackages)) + { + writer.WritePropertyName("cranPackages"); + writer.WriteStartArray(); + foreach (var item in CranPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(GitHubPackages)) + { + writer.WritePropertyName("gitHubPackages"); + writer.WriteStartArray(); + foreach (var item in GitHubPackages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(CustomUrlPackages)) + { + writer.WritePropertyName("customUrlPackages"); + writer.WriteStartArray(); + foreach (var item in CustomUrlPackages) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BioConductorPackages)) + { + writer.WritePropertyName("bioConductorPackages"); + writer.WriteStartArray(); + foreach (var item in BioConductorPackages) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static RSectionResponse DeserializeRSectionResponse(JsonElement element) + { + Optional rVersion = default; + Optional userManaged = default; + Optional rscriptPath = default; + Optional snapshotDate = default; + Optional> cranPackages = default; + Optional> gitHubPackages = default; + Optional> customUrlPackages = default; + Optional> bioConductorPackages = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rVersion")) + { + rVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("userManaged")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + userManaged = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("rscriptPath")) + { + rscriptPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("snapshotDate")) + { + snapshotDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("cranPackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RCranPackage.DeserializeRCranPackage(item)); + } + cranPackages = array; + continue; + } + if (property.NameEquals("gitHubPackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RGitHubPackageResponse.DeserializeRGitHubPackageResponse(item)); + } + gitHubPackages = array; + continue; + } + if (property.NameEquals("customUrlPackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + customUrlPackages = array; + continue; + } + if (property.NameEquals("bioConductorPackages")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + bioConductorPackages = array; + continue; + } + } + return new RSectionResponse(rVersion.Value, Optional.ToNullable(userManaged), rscriptPath.Value, snapshotDate.Value, Optional.ToList(cranPackages), Optional.ToList(gitHubPackages), Optional.ToList(customUrlPackages), Optional.ToList(bioConductorPackages)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.cs new file mode 100644 index 000000000000..d3d12896f588 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RSectionResponse.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The RSectionResponse. + public partial class RSectionResponse + { + /// Initializes a new instance of RSectionResponse. + public RSectionResponse() + { + CranPackages = new ChangeTrackingList(); + GitHubPackages = new ChangeTrackingList(); + CustomUrlPackages = new ChangeTrackingList(); + BioConductorPackages = new ChangeTrackingList(); + } + + /// Initializes a new instance of RSectionResponse. + /// The version of R to be installed. + /// Indicates whether the environment is managed by user or by AzureML. + /// + /// The Rscript path to use if an environment build is not required. + /// + /// The path specified gets used to call the user script. + /// + /// Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". + /// The CRAN packages to use. + /// The packages directly from GitHub. + /// The packages from custom urls. + /// The packages from Bioconductor. + internal RSectionResponse(string rVersion, bool? userManaged, string rscriptPath, string snapshotDate, IList cranPackages, IList gitHubPackages, IList customUrlPackages, IList bioConductorPackages) + { + RVersion = rVersion; + UserManaged = userManaged; + RscriptPath = rscriptPath; + SnapshotDate = snapshotDate; + CranPackages = cranPackages; + GitHubPackages = gitHubPackages; + CustomUrlPackages = customUrlPackages; + BioConductorPackages = bioConductorPackages; + } + + /// The version of R to be installed. + public string RVersion { get; set; } + /// Indicates whether the environment is managed by user or by AzureML. + public bool? UserManaged { get; set; } + /// + /// The Rscript path to use if an environment build is not required. + /// + /// The path specified gets used to call the user script. + /// + public string RscriptPath { get; set; } + /// Date of MRAN snapshot to use in YYYY-MM-DD format, e.g. "2019-04-17". + public string SnapshotDate { get; set; } + /// The CRAN packages to use. + public IList CranPackages { get; } + /// The packages directly from GitHub. + public IList GitHubPackages { get; } + /// The packages from custom urls. + public IList CustomUrlPackages { get; } + /// The packages from Bioconductor. + public IList BioConductorPackages { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ReasonCode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ReasonCode.cs new file mode 100644 index 000000000000..cf5d40f93cbf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ReasonCode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The reason for the restriction. + public readonly partial struct ReasonCode : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public ReasonCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string NotAvailableForRegionValue = "NotAvailableForRegion"; + private const string NotAvailableForSubscriptionValue = "NotAvailableForSubscription"; + + /// NotSpecified. + public static ReasonCode NotSpecified { get; } = new ReasonCode(NotSpecifiedValue); + /// NotAvailableForRegion. + public static ReasonCode NotAvailableForRegion { get; } = new ReasonCode(NotAvailableForRegionValue); + /// NotAvailableForSubscription. + public static ReasonCode NotAvailableForSubscription { get; } = new ReasonCode(NotAvailableForSubscriptionValue); + /// Determines if two values are the same. + public static bool operator ==(ReasonCode left, ReasonCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ReasonCode left, ReasonCode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ReasonCode(string value) => new ReasonCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ReasonCode other && Equals(other); + /// + public bool Equals(ReasonCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RegistryListCredentialsResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RegistryListCredentialsResult.Serialization.cs new file mode 100644 index 000000000000..5b97da59de0a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RegistryListCredentialsResult.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class RegistryListCredentialsResult + { + internal static RegistryListCredentialsResult DeserializeRegistryListCredentialsResult(JsonElement element) + { + Optional location = default; + Optional username = default; + Optional> passwords = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("passwords")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Password.DeserializePassword(item)); + } + passwords = array; + continue; + } + } + return new RegistryListCredentialsResult(location.Value, username.Value, Optional.ToList(passwords)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RegistryListCredentialsResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RegistryListCredentialsResult.cs new file mode 100644 index 000000000000..78ef137f2f98 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RegistryListCredentialsResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The RegistryListCredentialsResult. + public partial class RegistryListCredentialsResult + { + /// Initializes a new instance of RegistryListCredentialsResult. + internal RegistryListCredentialsResult() + { + Passwords = new ChangeTrackingList(); + } + + /// Initializes a new instance of RegistryListCredentialsResult. + /// . + /// . + /// . + internal RegistryListCredentialsResult(string location, string username, IReadOnlyList passwords) + { + Location = location; + Username = username; + Passwords = passwords; + } + + public string Location { get; } + public string Username { get; } + public IReadOnlyList Passwords { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RemoteLoginPortPublicAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RemoteLoginPortPublicAccess.cs new file mode 100644 index 000000000000..1388d451ecd0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RemoteLoginPortPublicAccess.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// 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. + public readonly partial struct RemoteLoginPortPublicAccess : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public RemoteLoginPortPublicAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + private const string NotSpecifiedValue = "NotSpecified"; + + /// Enabled. + public static RemoteLoginPortPublicAccess Enabled { get; } = new RemoteLoginPortPublicAccess(EnabledValue); + /// Disabled. + public static RemoteLoginPortPublicAccess Disabled { get; } = new RemoteLoginPortPublicAccess(DisabledValue); + /// NotSpecified. + public static RemoteLoginPortPublicAccess NotSpecified { get; } = new RemoteLoginPortPublicAccess(NotSpecifiedValue); + /// Determines if two values are the same. + public static bool operator ==(RemoteLoginPortPublicAccess left, RemoteLoginPortPublicAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RemoteLoginPortPublicAccess left, RemoteLoginPortPublicAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RemoteLoginPortPublicAccess(string value) => new RemoteLoginPortPublicAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RemoteLoginPortPublicAccess other && Equals(other); + /// + public bool Equals(RemoteLoginPortPublicAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.Serialization.cs new file mode 100644 index 000000000000..d3e6c5529552 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Resource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static Resource DeserializeResource(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional identity = default; + Optional location = default; + Optional type = default; + Optional> tags = default; + Optional sku = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = Identity.DeserializeIdentity(property.Value); + continue; + } + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = Sku.DeserializeSku(property.Value); + continue; + } + } + return new Resource(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.cs new file mode 100644 index 000000000000..309b2da5db95 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Resource.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Azure Resource Manager resource envelope. + public partial class Resource + { + /// Initializes a new instance of Resource. + public Resource() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of Resource. + /// Specifies the resource ID. + /// Specifies the name of the resource. + /// The identity of the resource. + /// Specifies the location of the resource. + /// Specifies the type of the resource. + /// Contains resource tags defined as key/value pairs. + /// The sku of the workspace. + internal Resource(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku) + { + Id = id; + Name = name; + Identity = identity; + Location = location; + Type = type; + Tags = tags; + Sku = sku; + } + + /// Specifies the resource ID. + public string Id { get; } + /// Specifies the name of the resource. + public string Name { get; } + /// The identity of the resource. + public Identity Identity { get; set; } + /// Specifies the location of the resource. + public string Location { get; set; } + /// Specifies the type of the resource. + public string Type { get; } + /// Contains resource tags defined as key/value pairs. + public IDictionary Tags { get; } + /// The sku of the workspace. + public Sku Sku { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceId.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceId.Serialization.cs new file mode 100644 index 000000000000..c4f9ac626a71 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceId.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ResourceId : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + writer.WriteEndObject(); + } + + internal static ResourceId DeserializeResourceId(JsonElement element) + { + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + } + return new ResourceId(id); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceId.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceId.cs new file mode 100644 index 000000000000..487e31b5526a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceId.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. + public partial class ResourceId + { + /// Initializes a new instance of ResourceId. + /// The ID of the resource. + /// is null. + public ResourceId(string id) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + + Id = id; + } + + /// The ID of the resource. + public string Id { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceIdentityType.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceIdentityType.Serialization.cs new file mode 100644 index 000000000000..6afb6d84f77c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceIdentityType.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + internal static class ResourceIdentityTypeExtensions + { + public static string ToSerialString(this ResourceIdentityType value) => value switch + { + ResourceIdentityType.SystemAssigned => "SystemAssigned", + ResourceIdentityType.SystemAssignedUserAssigned => "SystemAssigned,UserAssigned", + ResourceIdentityType.UserAssigned => "UserAssigned", + ResourceIdentityType.None => "None", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResourceIdentityType value.") + }; + + public static ResourceIdentityType ToResourceIdentityType(this string value) + { + if (string.Equals(value, "SystemAssigned", StringComparison.InvariantCultureIgnoreCase)) return ResourceIdentityType.SystemAssigned; + if (string.Equals(value, "SystemAssigned,UserAssigned", StringComparison.InvariantCultureIgnoreCase)) return ResourceIdentityType.SystemAssignedUserAssigned; + if (string.Equals(value, "UserAssigned", StringComparison.InvariantCultureIgnoreCase)) return ResourceIdentityType.UserAssigned; + if (string.Equals(value, "None", StringComparison.InvariantCultureIgnoreCase)) return ResourceIdentityType.None; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResourceIdentityType value."); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceIdentityType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceIdentityType.cs new file mode 100644 index 000000000000..f1365c6fbae9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceIdentityType.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The identity type. + public enum ResourceIdentityType + { + /// SystemAssigned. + SystemAssigned, + /// SystemAssigned,UserAssigned. + SystemAssignedUserAssigned, + /// UserAssigned. + UserAssigned, + /// None. + None + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceName.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceName.Serialization.cs new file mode 100644 index 000000000000..caeb2f57ac36 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceName.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ResourceName + { + internal static ResourceName DeserializeResourceName(JsonElement element) + { + Optional value = default; + Optional localizedValue = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("localizedValue")) + { + localizedValue = property.Value.GetString(); + continue; + } + } + return new ResourceName(value.Value, localizedValue.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceName.cs new file mode 100644 index 000000000000..4d47c47ffcd3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceName.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Resource Name. + public partial class ResourceName + { + /// Initializes a new instance of ResourceName. + internal ResourceName() + { + } + + /// Initializes a new instance of ResourceName. + /// The name of the resource. + /// The localized name of the resource. + internal ResourceName(string value, string localizedValue) + { + Value = value; + LocalizedValue = localizedValue; + } + + /// The name of the resource. + public string Value { get; } + /// The localized name of the resource. + public string LocalizedValue { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceQuota.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceQuota.Serialization.cs new file mode 100644 index 000000000000..9bcd7f33f4c8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceQuota.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ResourceQuota + { + internal static ResourceQuota DeserializeResourceQuota(JsonElement element) + { + Optional id = default; + Optional amlWorkspaceLocation = default; + Optional type = default; + Optional name = default; + Optional limit = default; + Optional unit = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("amlWorkspaceLocation")) + { + amlWorkspaceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + name = ResourceName.DeserializeResourceName(property.Value); + continue; + } + if (property.NameEquals("limit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + limit = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("unit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unit = new QuotaUnit(property.Value.GetString()); + continue; + } + } + return new ResourceQuota(id.Value, amlWorkspaceLocation.Value, type.Value, name.Value, Optional.ToNullable(limit), Optional.ToNullable(unit)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceQuota.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceQuota.cs new file mode 100644 index 000000000000..b83824a9e456 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceQuota.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The quota assigned to a resource. + public partial class ResourceQuota + { + /// Initializes a new instance of ResourceQuota. + internal ResourceQuota() + { + } + + /// Initializes a new instance of ResourceQuota. + /// Specifies the resource ID. + /// Region of the AML workspace in the id. + /// Specifies the resource type. + /// Name of the resource. + /// The maximum permitted quota of the resource. + /// An enum describing the unit of quota measurement. + internal ResourceQuota(string id, string amlWorkspaceLocation, string type, ResourceName name, long? limit, QuotaUnit? unit) + { + Id = id; + AmlWorkspaceLocation = amlWorkspaceLocation; + Type = type; + Name = name; + Limit = limit; + Unit = unit; + } + + /// Specifies the resource ID. + public string Id { get; } + /// Region of the AML workspace in the id. + public string AmlWorkspaceLocation { get; } + /// Specifies the resource type. + public string Type { get; } + /// Name of the resource. + public ResourceName Name { get; } + /// The maximum permitted quota of the resource. + public long? Limit { get; } + /// An enum describing the unit of quota measurement. + public QuotaUnit? Unit { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs new file mode 100644 index 000000000000..3304dba306df --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuLocationInfo.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ResourceSkuLocationInfo + { + internal static ResourceSkuLocationInfo DeserializeResourceSkuLocationInfo(JsonElement element) + { + Optional location = default; + Optional> zones = default; + Optional> zoneDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("zones")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("zoneDetails")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceSkuZoneDetails.DeserializeResourceSkuZoneDetails(item)); + } + zoneDetails = array; + continue; + } + } + return new ResourceSkuLocationInfo(location.Value, Optional.ToList(zones), Optional.ToList(zoneDetails)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuLocationInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuLocationInfo.cs new file mode 100644 index 000000000000..a16888715df5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuLocationInfo.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ResourceSkuLocationInfo. + public partial class ResourceSkuLocationInfo + { + /// Initializes a new instance of ResourceSkuLocationInfo. + internal ResourceSkuLocationInfo() + { + Zones = new ChangeTrackingList(); + ZoneDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceSkuLocationInfo. + /// Location of the SKU. + /// List of availability zones where the SKU is supported. + /// Details of capabilities available to a SKU in specific zones. + internal ResourceSkuLocationInfo(string location, IReadOnlyList zones, IReadOnlyList zoneDetails) + { + Location = location; + Zones = zones; + ZoneDetails = zoneDetails; + } + + /// Location of the SKU. + public string Location { get; } + /// List of availability zones where the SKU is supported. + public IReadOnlyList Zones { get; } + /// Details of capabilities available to a SKU in specific zones. + public IReadOnlyList ZoneDetails { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs new file mode 100644 index 000000000000..8d950b8f1f7e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuZoneDetails.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ResourceSkuZoneDetails + { + internal static ResourceSkuZoneDetails DeserializeResourceSkuZoneDetails(JsonElement element) + { + Optional> name = default; + Optional> capabilities = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + name = array; + continue; + } + if (property.NameEquals("capabilities")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SKUCapability.DeserializeSKUCapability(item)); + } + capabilities = array; + continue; + } + } + return new ResourceSkuZoneDetails(Optional.ToList(name), Optional.ToList(capabilities)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuZoneDetails.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuZoneDetails.cs new file mode 100644 index 000000000000..1dd693f62243 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ResourceSkuZoneDetails.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Describes The zonal capabilities of a SKU. + public partial class ResourceSkuZoneDetails + { + /// Initializes a new instance of ResourceSkuZoneDetails. + internal ResourceSkuZoneDetails() + { + Name = new ChangeTrackingList(); + Capabilities = new ChangeTrackingList(); + } + + /// Initializes a new instance of ResourceSkuZoneDetails. + /// The set of zones that the SKU is available in with the specified capabilities. + /// A list of capabilities that are available for the SKU in the specified list of zones. + internal ResourceSkuZoneDetails(IReadOnlyList name, IReadOnlyList capabilities) + { + Name = name; + Capabilities = capabilities; + } + + /// The set of zones that the SKU is available in with the specified capabilities. + public IReadOnlyList Name { get; } + /// A list of capabilities that are available for the SKU in the specified list of zones. + public IReadOnlyList Capabilities { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Restriction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Restriction.Serialization.cs new file mode 100644 index 000000000000..6195d5e86736 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Restriction.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Restriction + { + internal static Restriction DeserializeRestriction(JsonElement element) + { + Optional type = default; + Optional> values = default; + Optional reasonCode = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("values")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + values = array; + continue; + } + if (property.NameEquals("reasonCode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + reasonCode = new ReasonCode(property.Value.GetString()); + continue; + } + } + return new Restriction(type.Value, Optional.ToList(values), Optional.ToNullable(reasonCode)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Restriction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Restriction.cs new file mode 100644 index 000000000000..df0b1bf2aa8d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Restriction.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The restriction because of which SKU cannot be used. + public partial class Restriction + { + /// Initializes a new instance of Restriction. + internal Restriction() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of Restriction. + /// The type of restrictions. As of now only possible value for this is location. + /// The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + /// The reason for the restriction. + internal Restriction(string type, IReadOnlyList values, ReasonCode? reasonCode) + { + Type = type; + Values = values; + ReasonCode = reasonCode; + } + + /// The type of restrictions. As of now only possible value for this is location. + public string Type { get; } + /// The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + public IReadOnlyList Values { get; } + /// The reason for the restriction. + public ReasonCode? ReasonCode { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RootError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RootError.cs new file mode 100644 index 000000000000..fb4fa5d16ec6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/RootError.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The RootError. + internal partial class RootError + { + /// Initializes a new instance of RootError. + internal RootError() + { + MessageParameters = new ChangeTrackingDictionary(); + Details = new ChangeTrackingList(); + } + + public string Code { get; } + public int? Severity { get; } + public string Message { get; } + public string MessageFormat { get; } + /// Dictionary of <string>. + public IReadOnlyDictionary MessageParameters { get; } + public string ReferenceCode { get; } + public string DetailsUri { get; } + public string Target { get; } + public IReadOnlyList Details { get; } + public InnerErrorResponse InnerError { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SKUCapability.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SKUCapability.Serialization.cs new file mode 100644 index 000000000000..b1a5ab1b3950 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SKUCapability.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SKUCapability + { + internal static SKUCapability DeserializeSKUCapability(JsonElement element) + { + Optional name = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + } + return new SKUCapability(name.Value, value.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SKUCapability.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SKUCapability.cs new file mode 100644 index 000000000000..91f6c7230fd1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SKUCapability.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Features/user capabilities associated with the sku. + public partial class SKUCapability + { + /// Initializes a new instance of SKUCapability. + internal SKUCapability() + { + } + + /// Initializes a new instance of SKUCapability. + /// Capability/Feature ID. + /// Details about the feature/capability. + internal SKUCapability(string name, string value) + { + Name = name; + Value = value; + } + + /// Capability/Feature ID. + public string Name { get; } + /// Details about the feature/capability. + public string Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.Serialization.cs new file mode 100644 index 000000000000..6919f35907eb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SasSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SasToken)) + { + writer.WritePropertyName("sasToken"); + writer.WriteStringValue(SasToken); + } + writer.WriteEndObject(); + } + + internal static SasSection DeserializeSasSection(JsonElement element) + { + Optional sasToken = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sasToken")) + { + sasToken = property.Value.GetString(); + continue; + } + } + return new SasSection(sasToken.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.cs new file mode 100644 index 000000000000..ac29b73e528a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SasSection.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The SasSection. + public partial class SasSection + { + /// Initializes a new instance of SasSection. + public SasSection() + { + } + + /// Initializes a new instance of SasSection. + /// Storage container SAS token. + internal SasSection(string sasToken) + { + SasToken = sasToken; + } + + /// Storage container SAS token. + public string SasToken { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettings.Serialization.cs new file mode 100644 index 000000000000..e98435830186 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettings.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ScaleSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("maxNodeCount"); + writer.WriteNumberValue(MaxNodeCount); + if (Optional.IsDefined(MinNodeCount)) + { + writer.WritePropertyName("minNodeCount"); + writer.WriteNumberValue(MinNodeCount.Value); + } + if (Optional.IsDefined(NodeIdleTimeBeforeScaleDown)) + { + writer.WritePropertyName("nodeIdleTimeBeforeScaleDown"); + writer.WriteStringValue(NodeIdleTimeBeforeScaleDown.Value, "P"); + } + writer.WriteEndObject(); + } + + internal static ScaleSettings DeserializeScaleSettings(JsonElement element) + { + int maxNodeCount = default; + Optional minNodeCount = default; + Optional nodeIdleTimeBeforeScaleDown = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxNodeCount")) + { + maxNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeIdleTimeBeforeScaleDown")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + nodeIdleTimeBeforeScaleDown = property.Value.GetTimeSpan("P"); + continue; + } + } + return new ScaleSettings(maxNodeCount, Optional.ToNullable(minNodeCount), Optional.ToNullable(nodeIdleTimeBeforeScaleDown)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettings.cs new file mode 100644 index 000000000000..0ec7603d5741 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ScaleSettings.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// scale settings for AML Compute. + public partial class ScaleSettings + { + /// Initializes a new instance of ScaleSettings. + /// Max number of nodes to use. + public ScaleSettings(int maxNodeCount) + { + MaxNodeCount = maxNodeCount; + } + + /// Initializes a new instance of ScaleSettings. + /// Max number of nodes to use. + /// Min number of nodes to use. + /// Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. + internal ScaleSettings(int maxNodeCount, int? minNodeCount, TimeSpan? nodeIdleTimeBeforeScaleDown) + { + MaxNodeCount = maxNodeCount; + MinNodeCount = minNodeCount; + NodeIdleTimeBeforeScaleDown = nodeIdleTimeBeforeScaleDown; + } + + /// Max number of nodes to use. + public int MaxNodeCount { get; set; } + /// Min number of nodes to use. + public int? MinNodeCount { get; set; } + /// Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. + public TimeSpan? NodeIdleTimeBeforeScaleDown { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalCredentials.cs new file mode 100644 index 000000000000..aa46b665a85a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalCredentials.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Service principal credentials. + internal partial class ServicePrincipalCredentials + { + /// Initializes a new instance of ServicePrincipalCredentials. + /// Client Id. + /// Client secret. + /// or is null. + internal ServicePrincipalCredentials(string clientId, string clientSecret) + { + if (clientId == null) + { + throw new ArgumentNullException(nameof(clientId)); + } + if (clientSecret == null) + { + throw new ArgumentNullException(nameof(clientSecret)); + } + + ClientId = clientId; + ClientSecret = clientSecret; + } + + /// Client Id. + public string ClientId { get; } + /// Client secret. + public string ClientSecret { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.Serialization.cs new file mode 100644 index 000000000000..d60441316353 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ServicePrincipalSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AuthorityUrl)) + { + writer.WritePropertyName("authorityUrl"); + writer.WriteStringValue(AuthorityUrl); + } + if (Optional.IsDefined(ResourceUri)) + { + writer.WritePropertyName("resourceUri"); + writer.WriteStringValue(ResourceUri); + } + writer.WritePropertyName("tenantId"); + writer.WriteStringValue(TenantId); + writer.WritePropertyName("clientId"); + writer.WriteStringValue(ClientId); + if (Optional.IsDefined(ClientSecret)) + { + writer.WritePropertyName("clientSecret"); + writer.WriteStringValue(ClientSecret); + } + writer.WriteEndObject(); + } + + internal static ServicePrincipalSection DeserializeServicePrincipalSection(JsonElement element) + { + Optional authorityUrl = default; + Optional resourceUri = default; + Guid tenantId = default; + Guid clientId = default; + Optional clientSecret = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authorityUrl")) + { + authorityUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceUri")) + { + resourceUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId")) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("clientId")) + { + clientId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("clientSecret")) + { + clientSecret = property.Value.GetString(); + continue; + } + } + return new ServicePrincipalSection(authorityUrl.Value, resourceUri.Value, tenantId, clientId, clientSecret.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.cs new file mode 100644 index 000000000000..0921056711e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServicePrincipalSection.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ServicePrincipalSection. + public partial class ServicePrincipalSection + { + /// Initializes a new instance of ServicePrincipalSection. + /// ID of the tenant to which the service principal belongs. + /// Service principal client ID. + public ServicePrincipalSection(Guid tenantId, Guid clientId) + { + TenantId = tenantId; + ClientId = clientId; + } + + /// Initializes a new instance of ServicePrincipalSection. + /// Authority URL used for authentication. + /// Resource the service principal has access to. + /// ID of the tenant to which the service principal belongs. + /// Service principal client ID. + /// Service principal secret. + internal ServicePrincipalSection(string authorityUrl, string resourceUri, Guid tenantId, Guid clientId, string clientSecret) + { + AuthorityUrl = authorityUrl; + ResourceUri = resourceUri; + TenantId = tenantId; + ClientId = clientId; + ClientSecret = clientSecret; + } + + /// Authority URL used for authentication. + public string AuthorityUrl { get; set; } + /// Resource the service principal has access to. + public string ResourceUri { get; set; } + /// ID of the tenant to which the service principal belongs. + public Guid TenantId { get; set; } + /// Service principal client ID. + public Guid ClientId { get; set; } + /// Service principal secret. + public string ClientSecret { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.Serialization.cs new file mode 100644 index 000000000000..e27d89631dca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ServiceResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static ServiceResource DeserializeServiceResource(JsonElement element) + { + Optional properties = default; + Optional id = default; + Optional name = default; + Optional identity = default; + Optional location = default; + Optional type = default; + Optional> tags = default; + Optional sku = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = ServiceResponseBase.DeserializeServiceResponseBase(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = Identity.DeserializeIdentity(property.Value); + continue; + } + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = Sku.DeserializeSku(property.Value); + continue; + } + } + return new ServiceResource(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.cs new file mode 100644 index 000000000000..c95e657f95f6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResource.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Machine Learning service object wrapped into ARM resource envelope. + public partial class ServiceResource : Resource + { + /// Initializes a new instance of ServiceResource. + public ServiceResource() + { + } + + /// Initializes a new instance of ServiceResource. + /// Specifies the resource ID. + /// Specifies the name of the resource. + /// The identity of the resource. + /// Specifies the location of the resource. + /// Specifies the type of the resource. + /// Contains resource tags defined as key/value pairs. + /// The sku of the workspace. + /// Service properties. + internal ServiceResource(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, ServiceResponseBase properties) : base(id, name, identity, location, type, tags, sku) + { + Properties = properties; + } + + /// Service properties. + public ServiceResponseBase Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.Serialization.cs new file mode 100644 index 000000000000..9b01a29fcf11 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.Serialization.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ServiceResponseBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(KvTags)) + { + writer.WritePropertyName("kvTags"); + writer.WriteStartObject(); + foreach (var item in KvTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(DeploymentType)) + { + writer.WritePropertyName("deploymentType"); + writer.WriteStringValue(DeploymentType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static ServiceResponseBase DeserializeServiceResponseBase(JsonElement element) + { + if (element.TryGetProperty("computeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ACI": return ACIServiceResponse.DeserializeACIServiceResponse(element); + case "AKS": return AKSServiceResponse.DeserializeAKSServiceResponse(element); + case "Custom": return AKSVariantResponse.DeserializeAKSVariantResponse(element); + } + } + Optional description = default; + Optional> kvTags = default; + Optional> properties = default; + Optional state = default; + Optional error = default; + ComputeEnvironmentType computeType = default; + Optional deploymentType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("kvTags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + kvTags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new WebServiceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = ErrorResponse.DeserializeErrorResponse(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + deploymentType = new DeploymentType(property.Value.GetString()); + continue; + } + } + return new ServiceResponseBase(description.Value, Optional.ToDictionary(kvTags), Optional.ToDictionary(properties), Optional.ToNullable(state), error.Value, computeType, Optional.ToNullable(deploymentType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.cs new file mode 100644 index 000000000000..7e45a55380f7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBase.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The base service response. The correct inherited response based on computeType will be returned (ex. ACIServiceResponse). + public partial class ServiceResponseBase + { + /// Initializes a new instance of ServiceResponseBase. + public ServiceResponseBase() + { + KvTags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ServiceResponseBase. + /// The service description. + /// The service tag dictionary. Tags are mutable. + /// The service property dictionary. Properties are immutable. + /// The current state of the service. + /// The error details. + /// The compute environment type for the service. + /// The deployment type for the service. + internal ServiceResponseBase(string description, IDictionary kvTags, IDictionary properties, WebServiceState? state, ErrorResponse error, ComputeEnvironmentType computeType, DeploymentType? deploymentType) + { + Description = description; + KvTags = kvTags; + Properties = properties; + State = state; + Error = error; + ComputeType = computeType; + DeploymentType = deploymentType; + } + + /// The service description. + public string Description { get; set; } + /// The service tag dictionary. Tags are mutable. + public IDictionary KvTags { get; } + /// The service property dictionary. Properties are immutable. + public IDictionary Properties { get; } + /// The current state of the service. + public WebServiceState? State { get; } + /// The error details. + public ErrorResponse Error { get; } + /// The compute environment type for the service. + internal ComputeEnvironmentType ComputeType { get; set; } + /// The deployment type for the service. + public DeploymentType? DeploymentType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.Serialization.cs new file mode 100644 index 000000000000..5a1ae32820d8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class ServiceResponseBaseError + { + internal static ServiceResponseBaseError DeserializeServiceResponseBaseError(JsonElement element) + { + Optional code = default; + Optional message = default; + Optional> details = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorDetail.DeserializeErrorDetail(item)); + } + details = array; + continue; + } + } + return new ServiceResponseBaseError(code.Value, message.Value, Optional.ToList(details)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.cs new file mode 100644 index 000000000000..171a688500e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/ServiceResponseBaseError.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The error details. + public partial class ServiceResponseBaseError : ErrorResponse + { + /// Initializes a new instance of ServiceResponseBaseError. + internal ServiceResponseBaseError() + { + } + + /// Initializes a new instance of ServiceResponseBaseError. + /// Error code. + /// Error message. + /// An array of error detail objects. + internal ServiceResponseBaseError(string code, string message, IReadOnlyList details) : base(code, message, details) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SharedPrivateLinkResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SharedPrivateLinkResource.Serialization.cs new file mode 100644 index 000000000000..562900e73a22 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SharedPrivateLinkResource.Serialization.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SharedPrivateLinkResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(PrivateLinkResourceId)) + { + writer.WritePropertyName("privateLinkResourceId"); + writer.WriteStringValue(PrivateLinkResourceId); + } + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"); + writer.WriteStringValue(GroupId); + } + if (Optional.IsDefined(RequestMessage)) + { + writer.WritePropertyName("requestMessage"); + writer.WriteStringValue(RequestMessage); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static SharedPrivateLinkResource DeserializeSharedPrivateLinkResource(JsonElement element) + { + Optional name = default; + Optional privateLinkResourceId = default; + Optional groupId = default; + Optional requestMessage = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("privateLinkResourceId")) + { + privateLinkResourceId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("groupId")) + { + groupId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("requestMessage")) + { + requestMessage = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("status")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new PrivateEndpointServiceConnectionStatus(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new SharedPrivateLinkResource(name.Value, privateLinkResourceId.Value, groupId.Value, requestMessage.Value, Optional.ToNullable(status)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SharedPrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SharedPrivateLinkResource.cs new file mode 100644 index 000000000000..64df14c03acd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SharedPrivateLinkResource.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The SharedPrivateLinkResource. + public partial class SharedPrivateLinkResource + { + /// Initializes a new instance of SharedPrivateLinkResource. + public SharedPrivateLinkResource() + { + } + + /// Initializes a new instance of SharedPrivateLinkResource. + /// Unique name of the private link. + /// The resource id that private link links to. + /// The private link resource group id. + /// Request message. + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + internal SharedPrivateLinkResource(string name, string privateLinkResourceId, string groupId, string requestMessage, PrivateEndpointServiceConnectionStatus? status) + { + Name = name; + PrivateLinkResourceId = privateLinkResourceId; + GroupId = groupId; + RequestMessage = requestMessage; + Status = status; + } + + /// Unique name of the private link. + public string Name { get; set; } + /// The resource id that private link links to. + public string PrivateLinkResourceId { get; set; } + /// The private link resource group id. + public string GroupId { get; set; } + /// Request message. + public string RequestMessage { get; set; } + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + public PrivateEndpointServiceConnectionStatus? Status { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Sku.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Sku.Serialization.cs new file mode 100644 index 000000000000..03a83a0acc86 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Sku.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Sku : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Tier)) + { + writer.WritePropertyName("tier"); + writer.WriteStringValue(Tier); + } + writer.WriteEndObject(); + } + + internal static Sku DeserializeSku(JsonElement element) + { + Optional name = default; + Optional tier = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("tier")) + { + tier = property.Value.GetString(); + continue; + } + } + return new Sku(name.Value, tier.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Sku.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Sku.cs new file mode 100644 index 000000000000..dd0f7a1a8ae7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Sku.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Sku of the resource. + public partial class Sku + { + /// Initializes a new instance of Sku. + public Sku() + { + } + + /// Initializes a new instance of Sku. + /// Name of the sku. + /// Tier of the sku like Basic or Enterprise. + internal Sku(string name, string tier) + { + Name = name; + Tier = tier; + } + + /// Name of the sku. + public string Name { get; set; } + /// Tier of the sku like Basic or Enterprise. + public string Tier { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SkuListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SkuListResult.Serialization.cs new file mode 100644 index 000000000000..18bf93cf0154 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SkuListResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SkuListResult + { + internal static SkuListResult DeserializeSkuListResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkspaceSku.DeserializeWorkspaceSku(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new SkuListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SkuListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SkuListResult.cs new file mode 100644 index 000000000000..fa5af3117086 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SkuListResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// List of skus with features. + public partial class SkuListResult + { + /// Initializes a new instance of SkuListResult. + internal SkuListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of SkuListResult. + /// . + /// The URI to fetch the next page of Workspace Skus. Call ListNext() with this URI to fetch the next page of Workspace Skus. + internal SkuListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + public IReadOnlyList Value { get; } + /// The URI to fetch the next page of Workspace Skus. Call ListNext() with this URI to fetch the next page of Workspace Skus. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.Serialization.cs new file mode 100644 index 000000000000..26c2a2f3cd8e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SparkMavenPackage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Group)) + { + writer.WritePropertyName("group"); + writer.WriteStringValue(Group); + } + if (Optional.IsDefined(Artifact)) + { + writer.WritePropertyName("artifact"); + writer.WriteStringValue(Artifact); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + } + + internal static SparkMavenPackage DeserializeSparkMavenPackage(JsonElement element) + { + Optional group = default; + Optional artifact = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("group")) + { + group = property.Value.GetString(); + continue; + } + if (property.NameEquals("artifact")) + { + artifact = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new SparkMavenPackage(group.Value, artifact.Value, version.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.cs new file mode 100644 index 000000000000..70233a0b29b0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SparkMavenPackage.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The SparkMavenPackage. + public partial class SparkMavenPackage + { + /// Initializes a new instance of SparkMavenPackage. + public SparkMavenPackage() + { + } + + /// Initializes a new instance of SparkMavenPackage. + /// . + /// . + /// . + internal SparkMavenPackage(string group, string artifact, string version) + { + Group = group; + Artifact = artifact; + Version = version; + } + + public string Group { get; set; } + public string Artifact { get; set; } + public string Version { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.Serialization.cs new file mode 100644 index 000000000000..9ca413fd8cf4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SqlAdminSection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("userId"); + writer.WriteStringValue(UserId); + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + writer.WriteEndObject(); + } + + internal static SqlAdminSection DeserializeSqlAdminSection(JsonElement element) + { + string userId = default; + Optional password = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userId")) + { + userId = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + password = property.Value.GetString(); + continue; + } + } + return new SqlAdminSection(userId, password.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.cs new file mode 100644 index 000000000000..935ba2e74c80 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SqlAdminSection.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The SqlAdminSection. + public partial class SqlAdminSection + { + /// Initializes a new instance of SqlAdminSection. + /// SQL database user name. + /// is null. + public SqlAdminSection(string userId) + { + if (userId == null) + { + throw new ArgumentNullException(nameof(userId)); + } + + UserId = userId; + } + + /// Initializes a new instance of SqlAdminSection. + /// SQL database user name. + /// SQL database password. + internal SqlAdminSection(string userId, string password) + { + UserId = userId; + Password = password; + } + + /// SQL database user name. + public string UserId { get; set; } + /// SQL database password. + public string Password { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SshPublicAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SshPublicAccess.cs new file mode 100644 index 000000000000..22d842e7f296 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SshPublicAccess.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// 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. + public readonly partial struct SshPublicAccess : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public SshPublicAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static SshPublicAccess Enabled { get; } = new SshPublicAccess(EnabledValue); + /// Disabled. + public static SshPublicAccess Disabled { get; } = new SshPublicAccess(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(SshPublicAccess left, SshPublicAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SshPublicAccess left, SshPublicAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SshPublicAccess(string value) => new SshPublicAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SshPublicAccess other && Equals(other); + /// + public bool Equals(SshPublicAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.Serialization.cs new file mode 100644 index 000000000000..83e5ce6e941d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SslConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Cert)) + { + writer.WritePropertyName("cert"); + writer.WriteStringValue(Cert); + } + if (Optional.IsDefined(Key)) + { + writer.WritePropertyName("key"); + writer.WriteStringValue(Key); + } + if (Optional.IsDefined(Cname)) + { + writer.WritePropertyName("cname"); + writer.WriteStringValue(Cname); + } + writer.WriteEndObject(); + } + + internal static SslConfiguration DeserializeSslConfiguration(JsonElement element) + { + Optional status = default; + Optional cert = default; + Optional key = default; + Optional cname = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new SslConfigurationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("cert")) + { + cert = property.Value.GetString(); + continue; + } + if (property.NameEquals("key")) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("cname")) + { + cname = property.Value.GetString(); + continue; + } + } + return new SslConfiguration(Optional.ToNullable(status), cert.Value, key.Value, cname.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.cs new file mode 100644 index 000000000000..8a6bf8cef696 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfiguration.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The ssl configuration for scoring. + public partial class SslConfiguration + { + /// Initializes a new instance of SslConfiguration. + public SslConfiguration() + { + } + + /// Initializes a new instance of SslConfiguration. + /// Enable or disable ssl for scoring. + /// Cert data. + /// Key data. + /// CNAME of the cert. + internal SslConfiguration(SslConfigurationStatus? status, string cert, string key, string cname) + { + Status = status; + Cert = cert; + Key = key; + Cname = cname; + } + + /// Enable or disable ssl for scoring. + public SslConfigurationStatus? Status { get; set; } + /// Cert data. + public string Cert { get; set; } + /// Key data. + public string Key { get; set; } + /// CNAME of the cert. + public string Cname { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfigurationStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfigurationStatus.cs new file mode 100644 index 000000000000..088e9129d66a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SslConfigurationStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Enable or disable ssl for scoring. + public readonly partial struct SslConfigurationStatus : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public SslConfigurationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Disabled. + public static SslConfigurationStatus Disabled { get; } = new SslConfigurationStatus(DisabledValue); + /// Enabled. + public static SslConfigurationStatus Enabled { get; } = new SslConfigurationStatus(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(SslConfigurationStatus left, SslConfigurationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SslConfigurationStatus left, SslConfigurationStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SslConfigurationStatus(string value) => new SslConfigurationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SslConfigurationStatus other && Equals(other); + /// + public bool Equals(SslConfigurationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Status.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Status.cs new file mode 100644 index 000000000000..5bf257d564c5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Status.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Status of update workspace quota. + public readonly partial struct Status : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public Status(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UndefinedValue = "Undefined"; + private const string SuccessValue = "Success"; + private const string FailureValue = "Failure"; + private const string InvalidQuotaBelowClusterMinimumValue = "InvalidQuotaBelowClusterMinimum"; + private const string InvalidQuotaExceedsSubscriptionLimitValue = "InvalidQuotaExceedsSubscriptionLimit"; + private const string InvalidVMFamilyNameValue = "InvalidVMFamilyName"; + private const string OperationNotSupportedForSkuValue = "OperationNotSupportedForSku"; + private const string OperationNotEnabledForRegionValue = "OperationNotEnabledForRegion"; + + /// Undefined. + public static Status Undefined { get; } = new Status(UndefinedValue); + /// Success. + public static Status Success { get; } = new Status(SuccessValue); + /// Failure. + public static Status Failure { get; } = new Status(FailureValue); + /// InvalidQuotaBelowClusterMinimum. + public static Status InvalidQuotaBelowClusterMinimum { get; } = new Status(InvalidQuotaBelowClusterMinimumValue); + /// InvalidQuotaExceedsSubscriptionLimit. + public static Status InvalidQuotaExceedsSubscriptionLimit { get; } = new Status(InvalidQuotaExceedsSubscriptionLimitValue); + /// InvalidVMFamilyName. + public static Status InvalidVMFamilyName { get; } = new Status(InvalidVMFamilyNameValue); + /// OperationNotSupportedForSku. + public static Status OperationNotSupportedForSku { get; } = new Status(OperationNotSupportedForSkuValue); + /// OperationNotEnabledForRegion. + public static Status OperationNotEnabledForRegion { get; } = new Status(OperationNotEnabledForRegionValue); + /// Determines if two values are the same. + public static bool operator ==(Status left, Status right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Status left, Status right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Status(string value) => new Status(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Status other && Equals(other); + /// + public bool Equals(Status other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.Serialization.cs new file mode 100644 index 000000000000..63e40bf8b389 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class StatusMessage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static StatusMessage DeserializeStatusMessage(JsonElement element) + { + Optional level = default; + Optional code = default; + Optional message = default; + Optional createdTimeUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("level")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + level = new StatusMessageLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdTimeUtc")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new StatusMessage(Optional.ToNullable(level), code.Value, message.Value, Optional.ToNullable(createdTimeUtc)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.cs new file mode 100644 index 000000000000..b456dfdb39b8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessage.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Active message associated with project. + public partial class StatusMessage + { + /// Initializes a new instance of StatusMessage. + public StatusMessage() + { + } + + /// Initializes a new instance of StatusMessage. + /// Severity level of message. + /// Service-defined message code. + /// A human-readable representation of the message code. + /// Time in UTC at which the message was created. + internal StatusMessage(StatusMessageLevel? level, string code, string message, DateTimeOffset? createdTimeUtc) + { + Level = level; + Code = code; + Message = message; + CreatedTimeUtc = createdTimeUtc; + } + + /// Severity level of message. + public StatusMessageLevel? Level { get; } + /// Service-defined message code. + public string Code { get; } + /// A human-readable representation of the message code. + public string Message { get; } + /// Time in UTC at which the message was created. + public DateTimeOffset? CreatedTimeUtc { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessageLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessageLevel.cs new file mode 100644 index 000000000000..b1f1624dafc8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/StatusMessageLevel.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Severity level of message. + public readonly partial struct StatusMessageLevel : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public StatusMessageLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ErrorValue = "Error"; + private const string InformationValue = "Information"; + private const string WarningValue = "Warning"; + + /// Error. + public static StatusMessageLevel Error { get; } = new StatusMessageLevel(ErrorValue); + /// Information. + public static StatusMessageLevel Information { get; } = new StatusMessageLevel(InformationValue); + /// Warning. + public static StatusMessageLevel Warning { get; } = new StatusMessageLevel(WarningValue); + /// Determines if two values are the same. + public static bool operator ==(StatusMessageLevel left, StatusMessageLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StatusMessageLevel left, StatusMessageLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StatusMessageLevel(string value) => new StatusMessageLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StatusMessageLevel other && Equals(other); + /// + public bool Equals(StatusMessageLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.Serialization.cs new file mode 100644 index 000000000000..838bf72ad485 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SweepJob : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WritePropertyName("parameterSamplingConfiguration"); + writer.WriteObjectValue(ParameterSamplingConfiguration); + if (Optional.IsDefined(TerminationConfiguration)) + { + writer.WritePropertyName("terminationConfiguration"); + writer.WriteObjectValue(TerminationConfiguration); + } + writer.WritePropertyName("evaluationConfiguration"); + writer.WriteObjectValue(EvaluationConfiguration); + if (Optional.IsDefined(TrialComponent)) + { + writer.WritePropertyName("trialComponent"); + writer.WriteObjectValue(TrialComponent); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"); + writer.WriteStringValue(ExperimentName); + } + writer.WritePropertyName("computeBinding"); + writer.WriteObjectValue(ComputeBinding); + if (Optional.IsDefined(Output)) + { + writer.WritePropertyName("output"); + writer.WriteObjectValue(Output); + } + writer.WritePropertyName("jobType"); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static SweepJob DeserializeSweepJob(JsonElement element) + { + Optional status = default; + ParameterSamplingConfiguration parameterSamplingConfiguration = default; + Optional terminationConfiguration = default; + EvaluationConfiguration evaluationConfiguration = default; + Optional trialComponent = default; + Optional experimentName = default; + ComputeBinding computeBinding = default; + Optional output = default; + JobType jobType = default; + Optional interactionEndpoints = default; + Optional description = default; + Optional> tags = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new JobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("parameterSamplingConfiguration")) + { + parameterSamplingConfiguration = ParameterSamplingConfiguration.DeserializeParameterSamplingConfiguration(property.Value); + continue; + } + if (property.NameEquals("terminationConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + terminationConfiguration = TerminationConfiguration.DeserializeTerminationConfiguration(property.Value); + continue; + } + if (property.NameEquals("evaluationConfiguration")) + { + evaluationConfiguration = EvaluationConfiguration.DeserializeEvaluationConfiguration(property.Value); + continue; + } + if (property.NameEquals("trialComponent")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + trialComponent = TrialComponent.DeserializeTrialComponent(property.Value); + continue; + } + if (property.NameEquals("experimentName")) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeBinding")) + { + computeBinding = ComputeBinding.DeserializeComputeBinding(property.Value); + continue; + } + if (property.NameEquals("output")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + output = JobOutput.DeserializeJobOutput(property.Value); + continue; + } + if (property.NameEquals("jobType")) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("interactionEndpoints")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + interactionEndpoints = JobBaseInteractionEndpoints.DeserializeJobBaseInteractionEndpoints(property.Value); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + } + return new SweepJob(jobType, interactionEndpoints.Value, description.Value, Optional.ToDictionary(tags), Optional.ToDictionary(properties), experimentName.Value, computeBinding, output.Value, Optional.ToNullable(status), parameterSamplingConfiguration, terminationConfiguration.Value, evaluationConfiguration, trialComponent.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.cs new file mode 100644 index 000000000000..d0b477584b69 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SweepJob.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The SweepJob. + public partial class SweepJob : ComputeJobBase + { + /// Initializes a new instance of SweepJob. + /// Compute binding definition. + /// class for all hyperparameter sampling algorithms. + /// . + /// , , or is null. + public SweepJob(ComputeBinding computeBinding, ParameterSamplingConfiguration parameterSamplingConfiguration, EvaluationConfiguration evaluationConfiguration) : base(computeBinding) + { + if (computeBinding == null) + { + throw new ArgumentNullException(nameof(computeBinding)); + } + if (parameterSamplingConfiguration == null) + { + throw new ArgumentNullException(nameof(parameterSamplingConfiguration)); + } + if (evaluationConfiguration == null) + { + throw new ArgumentNullException(nameof(evaluationConfiguration)); + } + + ParameterSamplingConfiguration = parameterSamplingConfiguration; + EvaluationConfiguration = evaluationConfiguration; + JobType = JobType.Sweep; + } + + /// Initializes a new instance of SweepJob. + /// Specifies the type of job. + /// + /// Dictonary of endpoint URIs, keyed by enumerated job endpoints. + /// + /// For local jobs, a job endpoint will have a value of FileStreamObject. + /// + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Compute binding definition. + /// . + /// The status of a job. + /// class for all hyperparameter sampling algorithms. + /// . + /// . + /// . + internal SweepJob(JobType jobType, JobBaseInteractionEndpoints interactionEndpoints, string description, IDictionary tags, IDictionary properties, string experimentName, ComputeBinding computeBinding, JobOutput output, JobStatus? status, ParameterSamplingConfiguration parameterSamplingConfiguration, TerminationConfiguration terminationConfiguration, EvaluationConfiguration evaluationConfiguration, TrialComponent trialComponent) : base(jobType, interactionEndpoints, description, tags, properties, experimentName, computeBinding, output) + { + Status = status; + ParameterSamplingConfiguration = parameterSamplingConfiguration; + TerminationConfiguration = terminationConfiguration; + EvaluationConfiguration = evaluationConfiguration; + TrialComponent = trialComponent; + JobType = jobType; + } + + /// The status of a job. + public JobStatus? Status { get; set; } + /// class for all hyperparameter sampling algorithms. + public ParameterSamplingConfiguration ParameterSamplingConfiguration { get; set; } + public TerminationConfiguration TerminationConfiguration { get; set; } + public EvaluationConfiguration EvaluationConfiguration { get; set; } + public TrialComponent TrialComponent { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.Serialization.cs new file mode 100644 index 000000000000..aa47c6988f2b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SystemData + { + internal static SystemData DeserializeSystemData(JsonElement element) + { + Optional createdBy = default; + Optional createdByType = default; + Optional createdAt = default; + Optional lastModifiedBy = default; + Optional lastModifiedByType = default; + Optional lastModifiedAt = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("createdBy")) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdByType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdByType = new CreatedByType(property.Value.GetString()); + continue; + } + if (property.NameEquals("createdAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastModifiedBy")) + { + lastModifiedBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModifiedByType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + lastModifiedByType = new CreatedByType(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastModifiedAt")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + lastModifiedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new SystemData(createdBy.Value, Optional.ToNullable(createdByType), Optional.ToNullable(createdAt), lastModifiedBy.Value, Optional.ToNullable(lastModifiedByType), Optional.ToNullable(lastModifiedAt)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.cs new file mode 100644 index 000000000000..11953ee43686 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemData.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + /// Initializes a new instance of SystemData. + internal SystemData() + { + } + + /// Initializes a new instance of SystemData. + /// The identity that created the resource. + /// The type of identity that created the resource. + /// The timestamp of resource creation (UTC). + /// The identity that last modified the resource. + /// The type of identity that last modified the resource. + /// The type of identity that last modified the resource. + internal SystemData(string createdBy, CreatedByType? createdByType, DateTimeOffset? createdAt, string lastModifiedBy, CreatedByType? lastModifiedByType, DateTimeOffset? lastModifiedAt) + { + CreatedBy = createdBy; + CreatedByType = createdByType; + CreatedAt = createdAt; + LastModifiedBy = lastModifiedBy; + LastModifiedByType = lastModifiedByType; + LastModifiedAt = lastModifiedAt; + } + + /// The identity that created the resource. + public string CreatedBy { get; } + /// The type of identity that created the resource. + public CreatedByType? CreatedByType { get; } + /// The timestamp of resource creation (UTC). + public DateTimeOffset? CreatedAt { get; } + /// The identity that last modified the resource. + public string LastModifiedBy { get; } + /// The type of identity that last modified the resource. + public CreatedByType? LastModifiedByType { get; } + /// The type of identity that last modified the resource. + public DateTimeOffset? LastModifiedAt { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemService.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemService.Serialization.cs new file mode 100644 index 000000000000..f33285ad4aae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemService.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class SystemService + { + internal static SystemService DeserializeSystemService(JsonElement element) + { + Optional systemServiceType = default; + Optional publicIpAddress = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("systemServiceType")) + { + systemServiceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicIpAddress")) + { + publicIpAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new SystemService(systemServiceType.Value, publicIpAddress.Value, version.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemService.cs new file mode 100644 index 000000000000..1183edc501ba --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/SystemService.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A system service running on a compute. + public partial class SystemService + { + /// Initializes a new instance of SystemService. + internal SystemService() + { + } + + /// Initializes a new instance of SystemService. + /// The type of this system service. + /// Public IP address. + /// The version for this type. + internal SystemService(string systemServiceType, string publicIpAddress, string version) + { + SystemServiceType = systemServiceType; + PublicIpAddress = publicIpAddress; + Version = version; + } + + /// The type of this system service. + public string SystemServiceType { get; } + /// Public IP address. + public string PublicIpAddress { get; } + /// The version for this type. + public string Version { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.Serialization.cs new file mode 100644 index 000000000000..e7f0ac1ac1d0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.Serialization.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class TerminationConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MaxTotalRuns)) + { + writer.WritePropertyName("maxTotalRuns"); + writer.WriteNumberValue(MaxTotalRuns.Value); + } + if (Optional.IsDefined(MaxConcurrentRuns)) + { + writer.WritePropertyName("maxConcurrentRuns"); + writer.WriteNumberValue(MaxConcurrentRuns.Value); + } + if (Optional.IsDefined(MaxDurationMinutes)) + { + writer.WritePropertyName("maxDurationMinutes"); + writer.WriteNumberValue(MaxDurationMinutes.Value); + } + if (Optional.IsDefined(EarlyTerminationPolicyConfiguration)) + { + writer.WritePropertyName("earlyTerminationPolicyConfiguration"); + writer.WriteObjectValue(EarlyTerminationPolicyConfiguration); + } + writer.WriteEndObject(); + } + + internal static TerminationConfiguration DeserializeTerminationConfiguration(JsonElement element) + { + Optional maxTotalRuns = default; + Optional maxConcurrentRuns = default; + Optional maxDurationMinutes = default; + Optional earlyTerminationPolicyConfiguration = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxTotalRuns")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxTotalRuns = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxConcurrentRuns")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxConcurrentRuns = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxDurationMinutes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxDurationMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("earlyTerminationPolicyConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + earlyTerminationPolicyConfiguration = EarlyTerminationPolicyConfiguration.DeserializeEarlyTerminationPolicyConfiguration(property.Value); + continue; + } + } + return new TerminationConfiguration(Optional.ToNullable(maxTotalRuns), Optional.ToNullable(maxConcurrentRuns), Optional.ToNullable(maxDurationMinutes), earlyTerminationPolicyConfiguration.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.cs new file mode 100644 index 000000000000..c93294419e61 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TerminationConfiguration.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The TerminationConfiguration. + public partial class TerminationConfiguration + { + /// Initializes a new instance of TerminationConfiguration. + public TerminationConfiguration() + { + } + + /// Initializes a new instance of TerminationConfiguration. + /// . + /// . + /// . + /// Early termination policies enable canceling poor-performing runs before they complete. + internal TerminationConfiguration(int? maxTotalRuns, int? maxConcurrentRuns, int? maxDurationMinutes, EarlyTerminationPolicyConfiguration earlyTerminationPolicyConfiguration) + { + MaxTotalRuns = maxTotalRuns; + MaxConcurrentRuns = maxConcurrentRuns; + MaxDurationMinutes = maxDurationMinutes; + EarlyTerminationPolicyConfiguration = earlyTerminationPolicyConfiguration; + } + + public int? MaxTotalRuns { get; set; } + public int? MaxConcurrentRuns { get; set; } + public int? MaxDurationMinutes { get; set; } + /// Early termination policies enable canceling poor-performing runs before they complete. + public EarlyTerminationPolicyConfiguration EarlyTerminationPolicyConfiguration { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.Serialization.cs new file mode 100644 index 000000000000..bc6b166c876a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class TrialComponent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CodeConfiguration)) + { + writer.WritePropertyName("codeConfiguration"); + writer.WriteObjectValue(CodeConfiguration); + } + if (Optional.IsDefined(EnvironmentId)) + { + writer.WritePropertyName("environmentId"); + writer.WriteStringValue(EnvironmentId); + } + if (Optional.IsCollectionDefined(DataBindings)) + { + writer.WritePropertyName("dataBindings"); + writer.WriteStartObject(); + foreach (var item in DataBindings) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(DistributionConfiguration)) + { + writer.WritePropertyName("distributionConfiguration"); + writer.WriteObjectValue(DistributionConfiguration); + } + writer.WriteEndObject(); + } + + internal static TrialComponent DeserializeTrialComponent(JsonElement element) + { + Optional codeConfiguration = default; + Optional environmentId = default; + Optional> dataBindings = default; + Optional distributionConfiguration = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("codeConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("environmentId")) + { + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBindings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DataBinding.DeserializeDataBinding(property0.Value)); + } + dataBindings = dictionary; + continue; + } + if (property.NameEquals("distributionConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + distributionConfiguration = DistributionConfiguration.DeserializeDistributionConfiguration(property.Value); + continue; + } + } + return new TrialComponent(codeConfiguration.Value, environmentId.Value, Optional.ToDictionary(dataBindings), distributionConfiguration.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.cs new file mode 100644 index 000000000000..1fcdaa452fec --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/TrialComponent.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The TrialComponent. + public partial class TrialComponent + { + /// Initializes a new instance of TrialComponent. + public TrialComponent() + { + DataBindings = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of TrialComponent. + /// . + /// Environment id of the job. + /// Mapping of data bindings used in the job. + /// . + internal TrialComponent(CodeConfiguration codeConfiguration, string environmentId, IDictionary dataBindings, DistributionConfiguration distributionConfiguration) + { + CodeConfiguration = codeConfiguration; + EnvironmentId = environmentId; + DataBindings = dataBindings; + DistributionConfiguration = distributionConfiguration; + } + + public CodeConfiguration CodeConfiguration { get; set; } + /// Environment id of the job. + public string EnvironmentId { get; set; } + /// Mapping of data bindings used in the job. + public IDictionary DataBindings { get; } + public DistributionConfiguration DistributionConfiguration { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UnderlyingResourceAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UnderlyingResourceAction.cs new file mode 100644 index 000000000000..0644bd9ef1b0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UnderlyingResourceAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The UnderlyingResourceAction. + public readonly partial struct UnderlyingResourceAction : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public UnderlyingResourceAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeleteValue = "Delete"; + private const string DetachValue = "Detach"; + + /// Delete. + public static UnderlyingResourceAction Delete { get; } = new UnderlyingResourceAction(DeleteValue); + /// Detach. + public static UnderlyingResourceAction Detach { get; } = new UnderlyingResourceAction(DetachValue); + /// Determines if two values are the same. + public static bool operator ==(UnderlyingResourceAction left, UnderlyingResourceAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UnderlyingResourceAction left, UnderlyingResourceAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UnderlyingResourceAction(string value) => new UnderlyingResourceAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UnderlyingResourceAction other && Equals(other); + /// + public bool Equals(UnderlyingResourceAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UnitOfMeasure.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UnitOfMeasure.cs new file mode 100644 index 000000000000..8e0d8528eab0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UnitOfMeasure.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The unit of time measurement for the specified VM price. Example: OneHour. + public readonly partial struct UnitOfMeasure : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public UnitOfMeasure(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OneHourValue = "OneHour"; + + /// OneHour. + public static UnitOfMeasure OneHour { get; } = new UnitOfMeasure(OneHourValue); + /// Determines if two values are the same. + public static bool operator ==(UnitOfMeasure left, UnitOfMeasure right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UnitOfMeasure left, UnitOfMeasure right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UnitOfMeasure(string value) => new UnitOfMeasure(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UnitOfMeasure other && Equals(other); + /// + public bool Equals(UnitOfMeasure other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotas.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotas.Serialization.cs new file mode 100644 index 000000000000..7a091c9a7fce --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotas.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class UpdateWorkspaceQuotas + { + internal static UpdateWorkspaceQuotas DeserializeUpdateWorkspaceQuotas(JsonElement element) + { + Optional id = default; + Optional type = default; + Optional limit = default; + Optional unit = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("limit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + limit = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("unit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unit = new QuotaUnit(property.Value.GetString()); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new Status(property.Value.GetString()); + continue; + } + } + return new UpdateWorkspaceQuotas(id.Value, type.Value, Optional.ToNullable(limit), Optional.ToNullable(unit), Optional.ToNullable(status)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotas.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotas.cs new file mode 100644 index 000000000000..f3ad3b2a34d0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotas.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The properties for update Quota response. + public partial class UpdateWorkspaceQuotas + { + /// Initializes a new instance of UpdateWorkspaceQuotas. + internal UpdateWorkspaceQuotas() + { + } + + /// Initializes a new instance of UpdateWorkspaceQuotas. + /// Specifies the resource ID. + /// Specifies the resource type. + /// The maximum permitted quota of the resource. + /// An enum describing the unit of quota measurement. + /// Status of update workspace quota. + internal UpdateWorkspaceQuotas(string id, string type, long? limit, QuotaUnit? unit, Status? status) + { + Id = id; + Type = type; + Limit = limit; + Unit = unit; + Status = status; + } + + /// Specifies the resource ID. + public string Id { get; } + /// Specifies the resource type. + public string Type { get; } + /// The maximum permitted quota of the resource. + public long? Limit { get; } + /// An enum describing the unit of quota measurement. + public QuotaUnit? Unit { get; } + /// Status of update workspace quota. + public Status? Status { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotasResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotasResult.Serialization.cs new file mode 100644 index 000000000000..d722ac49048d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotasResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class UpdateWorkspaceQuotasResult + { + internal static UpdateWorkspaceQuotasResult DeserializeUpdateWorkspaceQuotasResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UpdateWorkspaceQuotas.DeserializeUpdateWorkspaceQuotas(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new UpdateWorkspaceQuotasResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotasResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotasResult.cs new file mode 100644 index 000000000000..2a1ad20e03b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UpdateWorkspaceQuotasResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The result of update workspace quota. + public partial class UpdateWorkspaceQuotasResult + { + /// Initializes a new instance of UpdateWorkspaceQuotasResult. + internal UpdateWorkspaceQuotasResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of UpdateWorkspaceQuotasResult. + /// The list of workspace quota update result. + /// The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. + internal UpdateWorkspaceQuotasResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of workspace quota update result. + public IReadOnlyList Value { get; } + /// The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Usage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Usage.Serialization.cs new file mode 100644 index 000000000000..74e7a61f1609 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Usage.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Usage + { + internal static Usage DeserializeUsage(JsonElement element) + { + Optional id = default; + Optional amlWorkspaceLocation = default; + Optional type = default; + Optional unit = default; + Optional currentValue = default; + Optional limit = default; + Optional name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("amlWorkspaceLocation")) + { + amlWorkspaceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("unit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unit = new UsageUnit(property.Value.GetString()); + continue; + } + if (property.NameEquals("currentValue")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + currentValue = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("limit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + limit = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + name = UsageName.DeserializeUsageName(property.Value); + continue; + } + } + return new Usage(id.Value, amlWorkspaceLocation.Value, type.Value, Optional.ToNullable(unit), Optional.ToNullable(currentValue), Optional.ToNullable(limit), name.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Usage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Usage.cs new file mode 100644 index 000000000000..ef498c440e88 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Usage.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Describes AML Resource Usage. + public partial class Usage + { + /// Initializes a new instance of Usage. + internal Usage() + { + } + + /// Initializes a new instance of Usage. + /// Specifies the resource ID. + /// Region of the AML workspace in the id. + /// Specifies the resource type. + /// An enum describing the unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// The name of the type of usage. + internal Usage(string id, string amlWorkspaceLocation, string type, UsageUnit? unit, long? currentValue, long? limit, UsageName name) + { + Id = id; + AmlWorkspaceLocation = amlWorkspaceLocation; + Type = type; + Unit = unit; + CurrentValue = currentValue; + Limit = limit; + Name = name; + } + + /// Specifies the resource ID. + public string Id { get; } + /// Region of the AML workspace in the id. + public string AmlWorkspaceLocation { get; } + /// Specifies the resource type. + public string Type { get; } + /// An enum describing the unit of usage measurement. + public UsageUnit? Unit { get; } + /// The current usage of the resource. + public long? CurrentValue { get; } + /// The maximum permitted usage of the resource. + public long? Limit { get; } + /// The name of the type of usage. + public UsageName Name { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageName.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageName.Serialization.cs new file mode 100644 index 000000000000..602cf98773c1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageName.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class UsageName + { + internal static UsageName DeserializeUsageName(JsonElement element) + { + Optional value = default; + Optional localizedValue = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("localizedValue")) + { + localizedValue = property.Value.GetString(); + continue; + } + } + return new UsageName(value.Value, localizedValue.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageName.cs new file mode 100644 index 000000000000..a459bca72960 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageName.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The Usage Names. + public partial class UsageName + { + /// Initializes a new instance of UsageName. + internal UsageName() + { + } + + /// Initializes a new instance of UsageName. + /// The name of the resource. + /// The localized name of the resource. + internal UsageName(string value, string localizedValue) + { + Value = value; + LocalizedValue = localizedValue; + } + + /// The name of the resource. + public string Value { get; } + /// The localized name of the resource. + public string LocalizedValue { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageUnit.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageUnit.cs new file mode 100644 index 000000000000..af13577996fe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UsageUnit.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// An enum describing the unit of usage measurement. + public readonly partial struct UsageUnit : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public UsageUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CountValue = "Count"; + + /// Count. + public static UsageUnit Count { get; } = new UsageUnit(CountValue); + /// Determines if two values are the same. + public static bool operator ==(UsageUnit left, UsageUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UsageUnit left, UsageUnit right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UsageUnit(string value) => new UsageUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UsageUnit other && Equals(other); + /// + public bool Equals(UsageUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAccountCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAccountCredentials.Serialization.cs new file mode 100644 index 000000000000..b429cace4634 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAccountCredentials.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class UserAccountCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("adminUserName"); + writer.WriteStringValue(AdminUserName); + if (Optional.IsDefined(AdminUserSshPublicKey)) + { + writer.WritePropertyName("adminUserSshPublicKey"); + writer.WriteStringValue(AdminUserSshPublicKey); + } + if (Optional.IsDefined(AdminUserPassword)) + { + writer.WritePropertyName("adminUserPassword"); + writer.WriteStringValue(AdminUserPassword); + } + writer.WriteEndObject(); + } + + internal static UserAccountCredentials DeserializeUserAccountCredentials(JsonElement element) + { + string adminUserName = default; + Optional adminUserSshPublicKey = default; + Optional adminUserPassword = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adminUserName")) + { + adminUserName = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminUserSshPublicKey")) + { + adminUserSshPublicKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminUserPassword")) + { + adminUserPassword = property.Value.GetString(); + continue; + } + } + return new UserAccountCredentials(adminUserName, adminUserSshPublicKey.Value, adminUserPassword.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAccountCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAccountCredentials.cs new file mode 100644 index 000000000000..af0f44f3e891 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAccountCredentials.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Settings for user account that gets created on each on the nodes of a compute. + public partial class UserAccountCredentials + { + /// Initializes a new instance of UserAccountCredentials. + /// Name of the administrator user account which can be used to SSH to nodes. + /// is null. + public UserAccountCredentials(string adminUserName) + { + if (adminUserName == null) + { + throw new ArgumentNullException(nameof(adminUserName)); + } + + AdminUserName = adminUserName; + } + + /// Initializes a new instance of UserAccountCredentials. + /// Name of the administrator user account which can be used to SSH to nodes. + /// SSH public key of the administrator user account. + /// Password of the administrator user account. + internal UserAccountCredentials(string adminUserName, string adminUserSshPublicKey, string adminUserPassword) + { + AdminUserName = adminUserName; + AdminUserSshPublicKey = adminUserSshPublicKey; + AdminUserPassword = adminUserPassword; + } + + /// Name of the administrator user account which can be used to SSH to nodes. + public string AdminUserName { get; set; } + /// SSH public key of the administrator user account. + public string AdminUserSshPublicKey { get; set; } + /// Password of the administrator user account. + public string AdminUserPassword { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAssignedIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAssignedIdentity.Serialization.cs new file mode 100644 index 000000000000..97c941074cb2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAssignedIdentity.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class UserAssignedIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static UserAssignedIdentity DeserializeUserAssignedIdentity(JsonElement element) + { + Optional principalId = default; + Optional tenantId = default; + Optional clientId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("principalId")) + { + principalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId")) + { + tenantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientId")) + { + clientId = property.Value.GetString(); + continue; + } + } + return new UserAssignedIdentity(principalId.Value, tenantId.Value, clientId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAssignedIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAssignedIdentity.cs new file mode 100644 index 000000000000..8dec43ecbf54 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/UserAssignedIdentity.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// User Assigned Identity. + public partial class UserAssignedIdentity + { + /// Initializes a new instance of UserAssignedIdentity. + public UserAssignedIdentity() + { + } + + /// Initializes a new instance of UserAssignedIdentity. + /// The principal ID of the user assigned identity. + /// The tenant ID of the user assigned identity. + /// The clientId(aka appId) of the user assigned identity. + internal UserAssignedIdentity(string principalId, string tenantId, string clientId) + { + PrincipalId = principalId; + TenantId = tenantId; + ClientId = clientId; + } + + /// The principal ID of the user assigned identity. + public string PrincipalId { get; } + /// The tenant ID of the user assigned identity. + public string TenantId { get; } + /// The clientId(aka appId) of the user assigned identity. + public string ClientId { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VMPriceOSType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VMPriceOSType.cs new file mode 100644 index 000000000000..3f66230cd04a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VMPriceOSType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Operating system type used by the VM. + public readonly partial struct VMPriceOSType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public VMPriceOSType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "Linux"; + private const string WindowsValue = "Windows"; + + /// Linux. + public static VMPriceOSType Linux { get; } = new VMPriceOSType(LinuxValue); + /// Windows. + public static VMPriceOSType Windows { get; } = new VMPriceOSType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(VMPriceOSType left, VMPriceOSType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VMPriceOSType left, VMPriceOSType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VMPriceOSType(string value) => new VMPriceOSType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VMPriceOSType other && Equals(other); + /// + public bool Equals(VMPriceOSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VMTier.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VMTier.cs new file mode 100644 index 000000000000..38e4ec4b222b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VMTier.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The type of the VM. + public readonly partial struct VMTier : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public VMTier(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardValue = "Standard"; + private const string LowPriorityValue = "LowPriority"; + private const string SpotValue = "Spot"; + + /// Standard. + public static VMTier Standard { get; } = new VMTier(StandardValue); + /// LowPriority. + public static VMTier LowPriority { get; } = new VMTier(LowPriorityValue); + /// Spot. + public static VMTier Spot { get; } = new VMTier(SpotValue); + /// Determines if two values are the same. + public static bool operator ==(VMTier left, VMTier right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VMTier left, VMTier right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VMTier(string value) => new VMTier(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VMTier other && Equals(other); + /// + public bool Equals(VMTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VariantType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VariantType.cs new file mode 100644 index 000000000000..a09c6affe15b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VariantType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The type of the variant. + public readonly partial struct VariantType : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public VariantType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ControlValue = "Control"; + private const string TreatmentValue = "Treatment"; + + /// Control. + public static VariantType Control { get; } = new VariantType(ControlValue); + /// Treatment. + public static VariantType Treatment { get; } = new VariantType(TreatmentValue); + /// Determines if two values are the same. + public static bool operator ==(VariantType left, VariantType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VariantType left, VariantType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VariantType(string value) => new VariantType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VariantType other && Equals(other); + /// + public bool Equals(VariantType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.Serialization.cs new file mode 100644 index 000000000000..973566fbab31 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class VirtualMachine : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + writer.WriteEndObject(); + } + + internal static VirtualMachine DeserializeVirtualMachine(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = VirtualMachineProperties.DeserializeVirtualMachineProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningServiceError.DeserializeMachineLearningServiceError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + } + return new VirtualMachine(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.cs new file mode 100644 index 000000000000..7a1debe2faa7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachine.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// A Machine Learning compute based on Azure Virtual Machines. + public partial class VirtualMachine : Compute + { + /// Initializes a new instance of VirtualMachine. + public VirtualMachine() + { + ComputeType = ComputeType.VirtualMachine; + } + + /// Initializes a new instance of VirtualMachine. + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The date and time when the compute was created. + /// The date and time when the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// . + internal VirtualMachine(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, VirtualMachineProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute) + { + Properties = properties; + ComputeType = computeType; + } + + public VirtualMachineProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineImage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineImage.Serialization.cs new file mode 100644 index 000000000000..135a80dc9845 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineImage.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class VirtualMachineImage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + writer.WriteEndObject(); + } + + internal static VirtualMachineImage DeserializeVirtualMachineImage(JsonElement element) + { + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + } + return new VirtualMachineImage(id); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineImage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineImage.cs new file mode 100644 index 000000000000..6e18e56882e8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineImage.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Virtual Machine image for Windows AML Compute. + public partial class VirtualMachineImage + { + /// Initializes a new instance of VirtualMachineImage. + /// Virtual Machine image path. + /// is null. + public VirtualMachineImage(string id) + { + if (id == null) + { + throw new ArgumentNullException(nameof(id)); + } + + Id = id; + } + + /// Virtual Machine image path. + public string Id { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.Serialization.cs new file mode 100644 index 000000000000..dcffc5fbf4be --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class VirtualMachineProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VirtualMachineSize)) + { + writer.WritePropertyName("virtualMachineSize"); + writer.WriteStringValue(VirtualMachineSize); + } + if (Optional.IsDefined(SshPort)) + { + writer.WritePropertyName("sshPort"); + writer.WriteNumberValue(SshPort.Value); + } + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"); + writer.WriteStringValue(Address); + } + if (Optional.IsDefined(AdministratorAccount)) + { + writer.WritePropertyName("administratorAccount"); + writer.WriteObjectValue(AdministratorAccount); + } + writer.WriteEndObject(); + } + + internal static VirtualMachineProperties DeserializeVirtualMachineProperties(JsonElement element) + { + Optional virtualMachineSize = default; + Optional sshPort = default; + Optional address = default; + Optional administratorAccount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachineSize")) + { + virtualMachineSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPort")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("address")) + { + address = property.Value.GetString(); + continue; + } + if (property.NameEquals("administratorAccount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + administratorAccount = VirtualMachineSshCredentials.DeserializeVirtualMachineSshCredentials(property.Value); + continue; + } + } + return new VirtualMachineProperties(virtualMachineSize.Value, Optional.ToNullable(sshPort), address.Value, administratorAccount.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.cs new file mode 100644 index 000000000000..2eee8a37ad13 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineProperties.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The VirtualMachineProperties. + public partial class VirtualMachineProperties + { + /// Initializes a new instance of VirtualMachineProperties. + public VirtualMachineProperties() + { + } + + /// Initializes a new instance of VirtualMachineProperties. + /// Virtual Machine size. + /// Port open for ssh connections. + /// Public IP address of the virtual machine. + /// Admin credentials for virtual machine. + internal VirtualMachineProperties(string virtualMachineSize, int? sshPort, string address, VirtualMachineSshCredentials administratorAccount) + { + VirtualMachineSize = virtualMachineSize; + SshPort = sshPort; + Address = address; + AdministratorAccount = administratorAccount; + } + + /// Virtual Machine size. + public string VirtualMachineSize { get; set; } + /// Port open for ssh connections. + public int? SshPort { get; set; } + /// Public IP address of the virtual machine. + public string Address { get; set; } + /// Admin credentials for virtual machine. + public VirtualMachineSshCredentials AdministratorAccount { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSecrets.Serialization.cs new file mode 100644 index 000000000000..6a3bc5bd5c8b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSecrets.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class VirtualMachineSecrets + { + internal static VirtualMachineSecrets DeserializeVirtualMachineSecrets(JsonElement element) + { + Optional administratorAccount = default; + ComputeType computeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("administratorAccount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + administratorAccount = VirtualMachineSshCredentials.DeserializeVirtualMachineSshCredentials(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + } + return new VirtualMachineSecrets(computeType, administratorAccount.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSecrets.cs new file mode 100644 index 000000000000..d0e5733b98b0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSecrets.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Secrets related to a Machine Learning compute based on AKS. + public partial class VirtualMachineSecrets : ComputeSecrets + { + /// Initializes a new instance of VirtualMachineSecrets. + internal VirtualMachineSecrets() + { + ComputeType = ComputeType.VirtualMachine; + } + + /// Initializes a new instance of VirtualMachineSecrets. + /// The type of compute. + /// Admin credentials for virtual machine. + internal VirtualMachineSecrets(ComputeType computeType, VirtualMachineSshCredentials administratorAccount) : base(computeType) + { + AdministratorAccount = administratorAccount; + ComputeType = computeType; + } + + /// Admin credentials for virtual machine. + public VirtualMachineSshCredentials AdministratorAccount { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.Serialization.cs new file mode 100644 index 000000000000..ef55c0117812 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.Serialization.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class VirtualMachineSize + { + internal static VirtualMachineSize DeserializeVirtualMachineSize(JsonElement element) + { + Optional name = default; + Optional family = default; + Optional vCPUs = default; + Optional gpus = default; + Optional osVhdSizeMB = default; + Optional maxResourceVolumeMB = default; + Optional memoryGB = default; + Optional lowPriorityCapable = default; + Optional premiumIO = default; + Optional estimatedVMPrices = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("family")) + { + family = property.Value.GetString(); + continue; + } + if (property.NameEquals("vCPUs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + vCPUs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("gpus")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + gpus = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("osVhdSizeMB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + osVhdSizeMB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxResourceVolumeMB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxResourceVolumeMB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + memoryGB = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("lowPriorityCapable")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + lowPriorityCapable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("premiumIO")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + premiumIO = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("estimatedVMPrices")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + estimatedVMPrices = EstimatedVMPrices.DeserializeEstimatedVMPrices(property.Value); + continue; + } + } + return new VirtualMachineSize(name.Value, family.Value, Optional.ToNullable(vCPUs), Optional.ToNullable(gpus), Optional.ToNullable(osVhdSizeMB), Optional.ToNullable(maxResourceVolumeMB), Optional.ToNullable(memoryGB), Optional.ToNullable(lowPriorityCapable), Optional.ToNullable(premiumIO), estimatedVMPrices.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.cs new file mode 100644 index 000000000000..cfceec2595af --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSize.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Describes the properties of a VM size. + public partial class VirtualMachineSize + { + /// Initializes a new instance of VirtualMachineSize. + internal VirtualMachineSize() + { + } + + /// Initializes a new instance of VirtualMachineSize. + /// The name of the virtual machine size. + /// The family name of the virtual machine size. + /// The number of vCPUs supported by the virtual machine size. + /// The number of gPUs supported by the virtual machine size. + /// The OS VHD disk size, in MB, allowed by the virtual machine size. + /// The resource volume size, in MB, allowed by the virtual machine size. + /// The amount of memory, in GB, supported by the virtual machine size. + /// Specifies if the virtual machine size supports low priority VMs. + /// Specifies if the virtual machine size supports premium IO. + /// The estimated price information for using a VM. + internal VirtualMachineSize(string name, string family, int? vCPUs, int? gpus, int? osVhdSizeMB, int? maxResourceVolumeMB, double? memoryGB, bool? lowPriorityCapable, bool? premiumIO, EstimatedVMPrices estimatedVMPrices) + { + Name = name; + Family = family; + VCPUs = vCPUs; + Gpus = gpus; + OsVhdSizeMB = osVhdSizeMB; + MaxResourceVolumeMB = maxResourceVolumeMB; + MemoryGB = memoryGB; + LowPriorityCapable = lowPriorityCapable; + PremiumIO = premiumIO; + EstimatedVMPrices = estimatedVMPrices; + } + + /// The name of the virtual machine size. + public string Name { get; } + /// The family name of the virtual machine size. + public string Family { get; } + /// The number of vCPUs supported by the virtual machine size. + public int? VCPUs { get; } + /// The number of gPUs supported by the virtual machine size. + public int? Gpus { get; } + /// The OS VHD disk size, in MB, allowed by the virtual machine size. + public int? OsVhdSizeMB { get; } + /// The resource volume size, in MB, allowed by the virtual machine size. + public int? MaxResourceVolumeMB { get; } + /// The amount of memory, in GB, supported by the virtual machine size. + public double? MemoryGB { get; } + /// Specifies if the virtual machine size supports low priority VMs. + public bool? LowPriorityCapable { get; } + /// Specifies if the virtual machine size supports premium IO. + public bool? PremiumIO { get; } + /// The estimated price information for using a VM. + public EstimatedVMPrices EstimatedVMPrices { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs new file mode 100644 index 000000000000..08d938861596 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class VirtualMachineSizeListResult + { + internal static VirtualMachineSizeListResult DeserializeVirtualMachineSizeListResult(JsonElement element) + { + Optional> amlCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("amlCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineSize.DeserializeVirtualMachineSize(item)); + } + amlCompute = array; + continue; + } + } + return new VirtualMachineSizeListResult(Optional.ToList(amlCompute)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.cs new file mode 100644 index 000000000000..445e54951871 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSizeListResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The List Virtual Machine size operation response. + public partial class VirtualMachineSizeListResult + { + /// Initializes a new instance of VirtualMachineSizeListResult. + internal VirtualMachineSizeListResult() + { + AmlCompute = new ChangeTrackingList(); + } + + /// Initializes a new instance of VirtualMachineSizeListResult. + /// The list of virtual machine sizes supported by AmlCompute. + internal VirtualMachineSizeListResult(IReadOnlyList amlCompute) + { + AmlCompute = amlCompute; + } + + /// The list of virtual machine sizes supported by AmlCompute. + public IReadOnlyList AmlCompute { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSshCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSshCredentials.Serialization.cs new file mode 100644 index 000000000000..165c93da8cc5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSshCredentials.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class VirtualMachineSshCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(PublicKeyData)) + { + writer.WritePropertyName("publicKeyData"); + writer.WriteStringValue(PublicKeyData); + } + if (Optional.IsDefined(PrivateKeyData)) + { + writer.WritePropertyName("privateKeyData"); + writer.WriteStringValue(PrivateKeyData); + } + writer.WriteEndObject(); + } + + internal static VirtualMachineSshCredentials DeserializeVirtualMachineSshCredentials(JsonElement element) + { + Optional username = default; + Optional password = default; + Optional publicKeyData = default; + Optional privateKeyData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicKeyData")) + { + publicKeyData = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKeyData")) + { + privateKeyData = property.Value.GetString(); + continue; + } + } + return new VirtualMachineSshCredentials(username.Value, password.Value, publicKeyData.Value, privateKeyData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSshCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSshCredentials.cs new file mode 100644 index 000000000000..26642599eb9b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VirtualMachineSshCredentials.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Admin credentials for virtual machine. + public partial class VirtualMachineSshCredentials + { + /// Initializes a new instance of VirtualMachineSshCredentials. + public VirtualMachineSshCredentials() + { + } + + /// Initializes a new instance of VirtualMachineSshCredentials. + /// Username of admin account. + /// Password of admin account. + /// Public key data. + /// Private key data. + internal VirtualMachineSshCredentials(string username, string password, string publicKeyData, string privateKeyData) + { + Username = username; + Password = password; + PublicKeyData = publicKeyData; + PrivateKeyData = privateKeyData; + } + + /// Username of admin account. + public string Username { get; set; } + /// Password of admin account. + public string Password { get; set; } + /// Public key data. + public string PublicKeyData { get; set; } + /// Private key data. + public string PrivateKeyData { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VmPriority.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VmPriority.cs new file mode 100644 index 000000000000..88355ebffbea --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VmPriority.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Virtual Machine priority. + public readonly partial struct VmPriority : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public VmPriority(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DedicatedValue = "Dedicated"; + private const string LowPriorityValue = "LowPriority"; + + /// Dedicated. + public static VmPriority Dedicated { get; } = new VmPriority(DedicatedValue); + /// LowPriority. + public static VmPriority LowPriority { get; } = new VmPriority(LowPriorityValue); + /// Determines if two values are the same. + public static bool operator ==(VmPriority left, VmPriority right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VmPriority left, VmPriority right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VmPriority(string value) => new VmPriority(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VmPriority other && Equals(other); + /// + public bool Equals(VmPriority other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.Serialization.cs new file mode 100644 index 000000000000..9fc21918e1e9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class VnetConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VnetName)) + { + writer.WritePropertyName("vnetName"); + writer.WriteStringValue(VnetName); + } + if (Optional.IsDefined(SubnetName)) + { + writer.WritePropertyName("subnetName"); + writer.WriteStringValue(SubnetName); + } + writer.WriteEndObject(); + } + + internal static VnetConfiguration DeserializeVnetConfiguration(JsonElement element) + { + Optional vnetName = default; + Optional subnetName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vnetName")) + { + vnetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetName")) + { + subnetName = property.Value.GetString(); + continue; + } + } + return new VnetConfiguration(vnetName.Value, subnetName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.cs new file mode 100644 index 000000000000..55084829220d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/VnetConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The VnetConfiguration. + public partial class VnetConfiguration + { + /// Initializes a new instance of VnetConfiguration. + public VnetConfiguration() + { + } + + /// Initializes a new instance of VnetConfiguration. + /// The name of the virtual network. + /// The name of the virtual network subnet. + internal VnetConfiguration(string vnetName, string subnetName) + { + VnetName = vnetName; + SubnetName = subnetName; + } + + /// The name of the virtual network. + public string VnetName { get; set; } + /// The name of the virtual network subnet. + public string SubnetName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WebServiceState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WebServiceState.cs new file mode 100644 index 000000000000..00e68251dd1a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WebServiceState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The current state of the service. + public readonly partial struct WebServiceState : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public WebServiceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TransitioningValue = "Transitioning"; + private const string HealthyValue = "Healthy"; + private const string UnhealthyValue = "Unhealthy"; + private const string FailedValue = "Failed"; + private const string UnschedulableValue = "Unschedulable"; + + /// Transitioning. + public static WebServiceState Transitioning { get; } = new WebServiceState(TransitioningValue); + /// Healthy. + public static WebServiceState Healthy { get; } = new WebServiceState(HealthyValue); + /// Unhealthy. + public static WebServiceState Unhealthy { get; } = new WebServiceState(UnhealthyValue); + /// Failed. + public static WebServiceState Failed { get; } = new WebServiceState(FailedValue); + /// Unschedulable. + public static WebServiceState Unschedulable { get; } = new WebServiceState(UnschedulableValue); + /// Determines if two values are the same. + public static bool operator ==(WebServiceState left, WebServiceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebServiceState left, WebServiceState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WebServiceState(string value) => new WebServiceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebServiceState other && Equals(other); + /// + public bool Equals(WebServiceState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.Serialization.cs new file mode 100644 index 000000000000..5b5d508bea15 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.Serialization.cs @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class Workspace : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(FriendlyName)) + { + writer.WritePropertyName("friendlyName"); + writer.WriteStringValue(FriendlyName); + } + if (Optional.IsDefined(KeyVault)) + { + writer.WritePropertyName("keyVault"); + writer.WriteStringValue(KeyVault); + } + if (Optional.IsDefined(ApplicationInsights)) + { + writer.WritePropertyName("applicationInsights"); + writer.WriteStringValue(ApplicationInsights); + } + if (Optional.IsDefined(ContainerRegistry)) + { + writer.WritePropertyName("containerRegistry"); + writer.WriteStringValue(ContainerRegistry); + } + if (Optional.IsDefined(StorageAccount)) + { + writer.WritePropertyName("storageAccount"); + writer.WriteStringValue(StorageAccount); + } + if (Optional.IsDefined(DiscoveryUrl)) + { + writer.WritePropertyName("discoveryUrl"); + writer.WriteStringValue(DiscoveryUrl); + } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"); + writer.WriteObjectValue(Encryption); + } + if (Optional.IsDefined(HbiWorkspace)) + { + writer.WritePropertyName("hbiWorkspace"); + writer.WriteBooleanValue(HbiWorkspace.Value); + } + if (Optional.IsDefined(ImageBuildCompute)) + { + writer.WritePropertyName("imageBuildCompute"); + writer.WriteStringValue(ImageBuildCompute); + } + if (Optional.IsDefined(AllowPublicAccessWhenBehindVnet)) + { + writer.WritePropertyName("allowPublicAccessWhenBehindVnet"); + writer.WriteBooleanValue(AllowPublicAccessWhenBehindVnet.Value); + } + if (Optional.IsCollectionDefined(SharedPrivateLinkResources)) + { + writer.WritePropertyName("sharedPrivateLinkResources"); + writer.WriteStartArray(); + foreach (var item in SharedPrivateLinkResources) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static Workspace DeserializeWorkspace(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional identity = default; + Optional location = default; + Optional type = default; + Optional> tags = default; + Optional sku = default; + Optional workspaceId = default; + Optional description = default; + Optional friendlyName = default; + Optional creationTime = default; + Optional keyVault = default; + Optional applicationInsights = default; + Optional containerRegistry = default; + Optional storageAccount = default; + Optional discoveryUrl = default; + Optional provisioningState = default; + Optional encryption = default; + Optional hbiWorkspace = default; + Optional serviceProvisionedResourceGroup = default; + Optional privateLinkCount = default; + Optional imageBuildCompute = default; + Optional allowPublicAccessWhenBehindVnet = default; + Optional> privateEndpointConnections = default; + Optional> sharedPrivateLinkResources = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = Identity.DeserializeIdentity(property.Value); + continue; + } + if (property.NameEquals("location")) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = Sku.DeserializeSku(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("workspaceId")) + { + workspaceId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description")) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("friendlyName")) + { + friendlyName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("creationTime")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + creationTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("keyVault")) + { + keyVault = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("applicationInsights")) + { + applicationInsights = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("containerRegistry")) + { + containerRegistry = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("storageAccount")) + { + storageAccount = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("discoveryUrl")) + { + discoveryUrl = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("provisioningState")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("encryption")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + encryption = EncryptionProperty.DeserializeEncryptionProperty(property0.Value); + continue; + } + if (property0.NameEquals("hbiWorkspace")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + hbiWorkspace = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("serviceProvisionedResourceGroup")) + { + serviceProvisionedResourceGroup = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("privateLinkCount")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + privateLinkCount = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("imageBuildCompute")) + { + imageBuildCompute = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("allowPublicAccessWhenBehindVnet")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + allowPublicAccessWhenBehindVnet = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("privateEndpointConnections")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(PrivateEndpointConnection.DeserializePrivateEndpointConnection(item)); + } + privateEndpointConnections = array; + continue; + } + if (property0.NameEquals("sharedPrivateLinkResources")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(SharedPrivateLinkResource.DeserializeSharedPrivateLinkResource(item)); + } + sharedPrivateLinkResources = array; + continue; + } + } + continue; + } + } + return new Workspace(id.Value, name.Value, identity.Value, location.Value, type.Value, Optional.ToDictionary(tags), sku.Value, workspaceId.Value, description.Value, friendlyName.Value, Optional.ToNullable(creationTime), keyVault.Value, applicationInsights.Value, containerRegistry.Value, storageAccount.Value, discoveryUrl.Value, Optional.ToNullable(provisioningState), encryption.Value, Optional.ToNullable(hbiWorkspace), serviceProvisionedResourceGroup.Value, Optional.ToNullable(privateLinkCount), imageBuildCompute.Value, Optional.ToNullable(allowPublicAccessWhenBehindVnet), Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.cs new file mode 100644 index 000000000000..2997cebf3be7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/Workspace.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// An object that represents a machine learning workspace. + public partial class Workspace : Resource + { + /// Initializes a new instance of Workspace. + public Workspace() + { + PrivateEndpointConnections = new ChangeTrackingList(); + SharedPrivateLinkResources = new ChangeTrackingList(); + } + + /// Initializes a new instance of Workspace. + /// Specifies the resource ID. + /// Specifies the name of the resource. + /// The identity of the resource. + /// Specifies the location of the resource. + /// Specifies the type of the resource. + /// Contains resource tags defined as key/value pairs. + /// The sku of the workspace. + /// The immutable id associated with this workspace. + /// The description of this workspace. + /// The friendly name for this workspace. This name in mutable. + /// The creation time of the machine learning workspace in ISO8601 format. + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. + /// ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created. + /// ARM id of the container registry associated with this workspace. This cannot be changed once the workspace has been created. + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// The encryption settings of Azure ML workspace. + /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + /// Count of private connections in the workspace. + /// The compute name for image build. + /// The flag to indicate whether to allow public access when behind VNet. + /// The list of private endpoint connections in the workspace. + /// The list of shared private link resources in this workspace. + internal Workspace(string id, string name, Identity identity, string location, string type, IDictionary tags, Sku sku, string workspaceId, string description, string friendlyName, DateTimeOffset? creationTime, string keyVault, string applicationInsights, string containerRegistry, string storageAccount, string discoveryUrl, ProvisioningState? provisioningState, EncryptionProperty encryption, bool? hbiWorkspace, string serviceProvisionedResourceGroup, int? privateLinkCount, string imageBuildCompute, bool? allowPublicAccessWhenBehindVnet, IReadOnlyList privateEndpointConnections, IList sharedPrivateLinkResources) : base(id, name, identity, location, type, tags, sku) + { + WorkspaceId = workspaceId; + Description = description; + FriendlyName = friendlyName; + CreationTime = creationTime; + KeyVault = keyVault; + ApplicationInsights = applicationInsights; + ContainerRegistry = containerRegistry; + StorageAccount = storageAccount; + DiscoveryUrl = discoveryUrl; + ProvisioningState = provisioningState; + Encryption = encryption; + HbiWorkspace = hbiWorkspace; + ServiceProvisionedResourceGroup = serviceProvisionedResourceGroup; + PrivateLinkCount = privateLinkCount; + ImageBuildCompute = imageBuildCompute; + AllowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; + PrivateEndpointConnections = privateEndpointConnections; + SharedPrivateLinkResources = sharedPrivateLinkResources; + } + + /// The immutable id associated with this workspace. + public string WorkspaceId { get; } + /// The description of this workspace. + public string Description { get; set; } + /// The friendly name for this workspace. This name in mutable. + public string FriendlyName { get; set; } + /// The creation time of the machine learning workspace in ISO8601 format. + public DateTimeOffset? CreationTime { get; } + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. + public string KeyVault { get; set; } + /// ARM id of the application insights associated with this workspace. This cannot be changed once the workspace has been created. + public string ApplicationInsights { get; set; } + /// ARM id of the container registry associated with this workspace. This cannot be changed once the workspace has been created. + public string ContainerRegistry { get; set; } + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + public string StorageAccount { get; set; } + /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. + public string DiscoveryUrl { get; set; } + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + public ProvisioningState? ProvisioningState { get; } + /// The encryption settings of Azure ML workspace. + public EncryptionProperty Encryption { get; set; } + /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. + public bool? HbiWorkspace { get; set; } + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + public string ServiceProvisionedResourceGroup { get; } + /// Count of private connections in the workspace. + public int? PrivateLinkCount { get; } + /// The compute name for image build. + public string ImageBuildCompute { get; set; } + /// The flag to indicate whether to allow public access when behind VNet. + public bool? AllowPublicAccessWhenBehindVnet { get; set; } + /// The list of private endpoint connections in the workspace. + public IReadOnlyList PrivateEndpointConnections { get; } + /// The list of shared private link resources in this workspace. + public IList SharedPrivateLinkResources { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.Serialization.cs new file mode 100644 index 000000000000..db468f6bffe1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class WorkspaceConnection + { + internal static WorkspaceConnection DeserializeWorkspaceConnection(JsonElement element) + { + Optional id = default; + Optional name = default; + Optional type = default; + Optional category = default; + Optional target = default; + Optional authType = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("category")) + { + category = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("target")) + { + target = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("authType")) + { + authType = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("value")) + { + value = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new WorkspaceConnection(id.Value, name.Value, type.Value, category.Value, target.Value, authType.Value, value.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.cs new file mode 100644 index 000000000000..4d6e0f609167 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnection.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Workspace connection. + public partial class WorkspaceConnection + { + /// Initializes a new instance of WorkspaceConnection. + internal WorkspaceConnection() + { + } + + /// Initializes a new instance of WorkspaceConnection. + /// ResourceId of the workspace connection. + /// Friendly name of the workspace connection. + /// Resource type of workspace connection. + /// Category of the workspace connection. + /// Target of the workspace connection. + /// Authorization type of the workspace connection. + /// Value details of the workspace connection. + internal WorkspaceConnection(string id, string name, string type, string category, string target, string authType, string value) + { + Id = id; + Name = name; + Type = type; + Category = category; + Target = target; + AuthType = authType; + Value = value; + } + + /// ResourceId of the workspace connection. + public string Id { get; } + /// Friendly name of the workspace connection. + public string Name { get; } + /// Resource type of workspace connection. + public string Type { get; } + /// Category of the workspace connection. + public string Category { get; } + /// Target of the workspace connection. + public string Target { get; } + /// Authorization type of the workspace connection. + public string AuthType { get; } + /// Value details of the workspace connection. + public string Value { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.Serialization.cs new file mode 100644 index 000000000000..1163d6a1f0dd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class WorkspaceConnectionDto : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"); + writer.WriteStringValue(Category); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"); + writer.WriteStringValue(AuthType); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.cs new file mode 100644 index 000000000000..823870a7928f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceConnectionDto.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// object used for creating workspace connection. + public partial class WorkspaceConnectionDto + { + /// Initializes a new instance of WorkspaceConnectionDto. + public WorkspaceConnectionDto() + { + } + + /// Friendly name of the workspace connection. + public string Name { get; set; } + /// Category of the workspace connection. + public string Category { get; set; } + /// Target of the workspace connection. + public string Target { get; set; } + /// Authorization type of the workspace connection. + public string AuthType { get; set; } + /// Value details of the workspace connection. + public string Value { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceListResult.Serialization.cs new file mode 100644 index 000000000000..f1647fec2cee --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceListResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class WorkspaceListResult + { + internal static WorkspaceListResult DeserializeWorkspaceListResult(JsonElement element) + { + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Workspace.DeserializeWorkspace(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink")) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new WorkspaceListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceListResult.cs new file mode 100644 index 000000000000..8e756ca1504f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceListResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The result of a request to list machine learning workspaces. + public partial class WorkspaceListResult + { + /// Initializes a new instance of WorkspaceListResult. + internal WorkspaceListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of WorkspaceListResult. + /// The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces. + /// The URI that can be used to request the next list of machine learning workspaces. + internal WorkspaceListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces. + public IReadOnlyList Value { get; } + /// The URI that can be used to request the next list of machine learning workspaces. + public string NextLink { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceSku.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceSku.Serialization.cs new file mode 100644 index 000000000000..96ba7ba272b3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceSku.Serialization.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class WorkspaceSku + { + internal static WorkspaceSku DeserializeWorkspaceSku(JsonElement element) + { + Optional> locations = default; + Optional> locationInfo = default; + Optional tier = default; + Optional resourceType = default; + Optional name = default; + Optional> capabilities = default; + Optional> restrictions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("locations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + locations = array; + continue; + } + if (property.NameEquals("locationInfo")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceSkuLocationInfo.DeserializeResourceSkuLocationInfo(item)); + } + locationInfo = array; + continue; + } + if (property.NameEquals("tier")) + { + tier = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceType")) + { + resourceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("capabilities")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SKUCapability.DeserializeSKUCapability(item)); + } + capabilities = array; + continue; + } + if (property.NameEquals("restrictions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Restriction.DeserializeRestriction(item)); + } + restrictions = array; + continue; + } + } + return new WorkspaceSku(Optional.ToList(locations), Optional.ToList(locationInfo), tier.Value, resourceType.Value, name.Value, Optional.ToList(capabilities), Optional.ToList(restrictions)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceSku.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceSku.cs new file mode 100644 index 000000000000..c302efa5a53e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceSku.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// Describes Workspace Sku details and features. + public partial class WorkspaceSku + { + /// Initializes a new instance of WorkspaceSku. + internal WorkspaceSku() + { + Locations = new ChangeTrackingList(); + LocationInfo = new ChangeTrackingList(); + Capabilities = new ChangeTrackingList(); + Restrictions = new ChangeTrackingList(); + } + + /// Initializes a new instance of WorkspaceSku. + /// The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). + /// A list of locations and availability zones in those locations where the SKU is available. + /// Sku Tier like Basic or Enterprise. + /// . + /// . + /// List of features/user capabilities associated with the sku. + /// The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + internal WorkspaceSku(IReadOnlyList locations, IReadOnlyList locationInfo, string tier, string resourceType, string name, IReadOnlyList capabilities, IReadOnlyList restrictions) + { + Locations = locations; + LocationInfo = locationInfo; + Tier = tier; + ResourceType = resourceType; + Name = name; + Capabilities = capabilities; + Restrictions = restrictions; + } + + /// The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). + public IReadOnlyList Locations { get; } + /// A list of locations and availability zones in those locations where the SKU is available. + public IReadOnlyList LocationInfo { get; } + /// Sku Tier like Basic or Enterprise. + public string Tier { get; } + public string ResourceType { get; } + public string Name { get; } + /// List of features/user capabilities associated with the sku. + public IReadOnlyList Capabilities { get; } + /// The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + public IReadOnlyList Restrictions { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.Serialization.cs new file mode 100644 index 000000000000..f531c94f1d3c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + public partial class WorkspaceUpdateParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(FriendlyName)) + { + writer.WritePropertyName("friendlyName"); + writer.WriteStringValue(FriendlyName); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.cs new file mode 100644 index 000000000000..2e801061b36c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Models/WorkspaceUpdateParameters.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearningServices.Models +{ + /// The parameters for updating a machine learning workspace. + public partial class WorkspaceUpdateParameters + { + /// Initializes a new instance of WorkspaceUpdateParameters. + public WorkspaceUpdateParameters() + { + Tags = new ChangeTrackingDictionary(); + } + + /// The resource tags for the machine learning workspace. + public IDictionary Tags { get; } + /// The sku of the workspace. + public Sku Sku { get; set; } + /// The description of this workspace. + public string Description { get; set; } + /// The friendly name for this workspace. + public string FriendlyName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksOperations.cs new file mode 100644 index 000000000000..d74a246732ed --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksOperations.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The Notebooks service client. + public partial class NotebooksOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal NotebooksRestOperations RestClient { get; } + /// Initializes a new instance of NotebooksOperations for mocking. + protected NotebooksOperations() + { + } + /// Initializes a new instance of NotebooksOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal NotebooksOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new NotebooksRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> ListKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("NotebooksOperations.ListKeys"); + scope.Start(); + try + { + return await RestClient.ListKeysAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response ListKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("NotebooksOperations.ListKeys"); + scope.Start(); + try + { + return RestClient.ListKeys(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual async Task StartPrepareAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("NotebooksOperations.StartPrepare"); + scope.Start(); + try + { + var originalResponse = await RestClient.PrepareAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return new NotebooksPrepareOperation(_clientDiagnostics, _pipeline, RestClient.CreatePrepareRequest(resourceGroupName, workspaceName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual NotebooksPrepareOperation StartPrepare(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("NotebooksOperations.StartPrepare"); + scope.Start(); + try + { + var originalResponse = RestClient.Prepare(resourceGroupName, workspaceName, cancellationToken); + return new NotebooksPrepareOperation(_clientDiagnostics, _pipeline, RestClient.CreatePrepareRequest(resourceGroupName, workspaceName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksPrepareOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksPrepareOperation.cs new file mode 100644 index 000000000000..e01a907009ed --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksPrepareOperation.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + public partial class NotebooksPrepareOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal NotebooksPrepareOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "NotebooksPrepareOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override NotebookResourceInfo Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + NotebookResourceInfo IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return NotebookResourceInfo.DeserializeNotebookResourceInfo(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return NotebookResourceInfo.DeserializeNotebookResourceInfo(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksRestOperations.cs new file mode 100644 index 000000000000..fa36e7bf1ced --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/NotebooksRestOperations.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class NotebooksRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of NotebooksRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public NotebooksRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreatePrepareRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/prepareNotebook", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task PrepareAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreatePrepareRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response Prepare(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreatePrepareRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListKeysRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/listNotebookKeys", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListKeysRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListNotebookKeysResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListNotebookKeysResult.DeserializeListNotebookKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response ListKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListKeysRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListNotebookKeysResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListNotebookKeysResult.DeserializeListNotebookKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Operations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Operations.cs new file mode 100644 index 000000000000..9c63e559394f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/Operations.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The service client. + public partial class Operations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal RestOperations RestClient { get; } + /// Initializes a new instance of Operations for mocking. + protected Operations() + { + } + /// Initializes a new instance of Operations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// server parameter. + /// Api Version. + internal Operations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new RestOperations(clientDiagnostics, pipeline, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Lists all of the available Azure Machine Learning Workspaces REST API operations. + /// The cancellation token to use. + public virtual AsyncPageable ListAsync(CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("Operations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); + } + + /// Lists all of the available Azure Machine Learning Workspaces REST API operations. + /// The cancellation token to use. + public virtual Pageable List(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("Operations.List"); + scope.Start(); + try + { + var response = RestClient.List(cancellationToken); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, null); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsOperations.cs new file mode 100644 index 000000000000..029a7e567dda --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsOperations.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The PrivateEndpointConnections service client. + public partial class PrivateEndpointConnectionsOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal PrivateEndpointConnectionsRestOperations RestClient { get; } + /// Initializes a new instance of PrivateEndpointConnectionsOperations for mocking. + protected PrivateEndpointConnectionsOperations() + { + } + /// Initializes a new instance of PrivateEndpointConnectionsOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal PrivateEndpointConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new PrivateEndpointConnectionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Gets the specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + public virtual Response Get(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(resourceGroupName, workspaceName, privateEndpointConnectionName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update the state of specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The private endpoint connection properties. + /// The cancellation token to use. + public virtual async Task> PutAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.Put"); + scope.Start(); + try + { + return await RestClient.PutAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update the state of specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The private endpoint connection properties. + /// The cancellation token to use. + public virtual Response Put(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.Put"); + scope.Start(); + try + { + return RestClient.Put(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes the specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes the specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + public virtual Response Delete(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(resourceGroupName, workspaceName, privateEndpointConnectionName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsRestOperations.cs new file mode 100644 index 000000000000..4bedc04eaf5d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateEndpointConnectionsRestOperations.cs @@ -0,0 +1,344 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class PrivateEndpointConnectionsRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public PrivateEndpointConnectionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets the specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (privateEndpointConnectionName == null) + { + throw new ArgumentNullException(nameof(privateEndpointConnectionName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets the specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (privateEndpointConnectionName == null) + { + throw new ArgumentNullException(nameof(privateEndpointConnectionName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePutRequest(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(properties); + request.Content = content; + return message; + } + + /// Update the state of specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The private endpoint connection properties. + /// The cancellation token to use. + /// , , , or is null. + public async Task> PutAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (privateEndpointConnectionName == null) + { + throw new ArgumentNullException(nameof(privateEndpointConnectionName)); + } + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + using var message = CreatePutRequest(resourceGroupName, workspaceName, privateEndpointConnectionName, properties); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Update the state of specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The private endpoint connection properties. + /// The cancellation token to use. + /// , , , or is null. + public Response Put(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (privateEndpointConnectionName == null) + { + throw new ArgumentNullException(nameof(privateEndpointConnectionName)); + } + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + using var message = CreatePutRequest(resourceGroupName, workspaceName, privateEndpointConnectionName, properties); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PrivateEndpointConnection.DeserializePrivateEndpointConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string resourceGroupName, string workspaceName, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Deletes the specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (privateEndpointConnectionName == null) + { + throw new ArgumentNullException(nameof(privateEndpointConnectionName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes the specified private endpoint connection associated with the workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (privateEndpointConnectionName == null) + { + throw new ArgumentNullException(nameof(privateEndpointConnectionName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesOperations.cs new file mode 100644 index 000000000000..152cf53282bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesOperations.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The PrivateLinkResources service client. + public partial class PrivateLinkResourcesOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal PrivateLinkResourcesRestOperations RestClient { get; } + /// Initializes a new instance of PrivateLinkResourcesOperations for mocking. + protected PrivateLinkResourcesOperations() + { + } + /// Initializes a new instance of PrivateLinkResourcesOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal PrivateLinkResourcesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new PrivateLinkResourcesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Gets the private link resources that need to be created for a workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesOperations.ListByWorkspace"); + scope.Start(); + try + { + return await RestClient.ListByWorkspaceAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the private link resources that need to be created for a workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response ListByWorkspace(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesOperations.ListByWorkspace"); + scope.Start(); + try + { + return RestClient.ListByWorkspace(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesRestOperations.cs new file mode 100644 index 000000000000..9f62e6fdb311 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/PrivateLinkResourcesRestOperations.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class PrivateLinkResourcesRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of PrivateLinkResourcesRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public PrivateLinkResourcesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListByWorkspaceRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets the private link resources that need to be created for a workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListByWorkspaceAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PrivateLinkResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PrivateLinkResourceListResult.DeserializePrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets the private link resources that need to be created for a workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response ListByWorkspace(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListByWorkspaceRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PrivateLinkResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PrivateLinkResourceListResult.DeserializePrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasOperations.cs new file mode 100644 index 000000000000..dc51f2ca457b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasOperations.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The Quotas service client. + public partial class QuotasOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal QuotasRestOperations RestClient { get; } + /// Initializes a new instance of QuotasOperations for mocking. + protected QuotasOperations() + { + } + /// Initializes a new instance of QuotasOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal QuotasOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new QuotasRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Update quota for each VM family in workspace. + /// The location for update quota is queried. + /// Quota update parameters. + /// The cancellation token to use. + public virtual async Task> UpdateAsync(string location, QuotaUpdateParameters parameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("QuotasOperations.Update"); + scope.Start(); + try + { + return await RestClient.UpdateAsync(location, parameters, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Update quota for each VM family in workspace. + /// The location for update quota is queried. + /// Quota update parameters. + /// The cancellation token to use. + public virtual Response Update(string location, QuotaUpdateParameters parameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("QuotasOperations.Update"); + scope.Start(); + try + { + return RestClient.Update(location, parameters, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the currently assigned Workspace Quotas based on VMFamily. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// is null. + public virtual AsyncPageable ListAsync(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("QuotasOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(location, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("QuotasOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, location, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Gets the currently assigned Workspace Quotas based on VMFamily. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// is null. + public virtual Pageable List(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("QuotasOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(location, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("QuotasOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, location, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasRestOperations.cs new file mode 100644 index 000000000000..efaa65685409 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/QuotasRestOperations.cs @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class QuotasRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of QuotasRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public QuotasRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateUpdateRequest(string location, QuotaUpdateParameters parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/updateQuotas", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(parameters); + request.Content = content; + return message; + } + + /// Update quota for each VM family in workspace. + /// The location for update quota is queried. + /// Quota update parameters. + /// The cancellation token to use. + /// or is null. + public async Task> UpdateAsync(string location, QuotaUpdateParameters parameters, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateUpdateRequest(location, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + UpdateWorkspaceQuotasResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = UpdateWorkspaceQuotasResult.DeserializeUpdateWorkspaceQuotasResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Update quota for each VM family in workspace. + /// The location for update quota is queried. + /// Quota update parameters. + /// The cancellation token to use. + /// or is null. + public Response Update(string location, QuotaUpdateParameters parameters, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateUpdateRequest(location, parameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + UpdateWorkspaceQuotasResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = UpdateWorkspaceQuotasResult.DeserializeUpdateWorkspaceQuotasResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/Quotas", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets the currently assigned Workspace Quotas based on VMFamily. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListRequest(location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListWorkspaceQuotas value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListWorkspaceQuotas.DeserializeListWorkspaceQuotas(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets the currently assigned Workspace Quotas based on VMFamily. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// is null. + public Response List(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListRequest(location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListWorkspaceQuotas value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListWorkspaceQuotas.DeserializeListWorkspaceQuotas(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets the currently assigned Workspace Quotas based on VMFamily. + /// The URL to the next page of results. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// or is null. + public async Task> ListNextPageAsync(string nextLink, string location, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListNextPageRequest(nextLink, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListWorkspaceQuotas value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListWorkspaceQuotas.DeserializeListWorkspaceQuotas(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets the currently assigned Workspace Quotas based on VMFamily. + /// The URL to the next page of results. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// or is null. + public Response ListNextPage(string nextLink, string location, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListNextPageRequest(nextLink, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListWorkspaceQuotas value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListWorkspaceQuotas.DeserializeListWorkspaceQuotas(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/RestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/RestOperations.cs new file mode 100644 index 000000000000..9c995cd07168 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/RestOperations.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class RestOperations + { + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of RestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// server parameter. + /// Api Version. + /// is null. + public RestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/operations", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all of the available Azure Machine Learning Workspaces REST API operations. + /// The cancellation token to use. + public async Task> ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all of the available Azure Machine Learning Workspaces REST API operations. + /// The cancellation token to use. + public Response List(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesOperations.cs new file mode 100644 index 000000000000..e585ce7ba3a5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesOperations.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The Usages service client. + public partial class UsagesOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal UsagesRestOperations RestClient { get; } + /// Initializes a new instance of UsagesOperations for mocking. + protected UsagesOperations() + { + } + /// Initializes a new instance of UsagesOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal UsagesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new UsagesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Gets the current usage information as well as limits for AML resources for given subscription and location. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// is null. + public virtual AsyncPageable ListAsync(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("UsagesOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(location, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("UsagesOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, location, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Gets the current usage information as well as limits for AML resources for given subscription and location. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// is null. + public virtual Pageable List(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("UsagesOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(location, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("UsagesOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, location, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesRestOperations.cs new file mode 100644 index 000000000000..a78f11f96594 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/UsagesRestOperations.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class UsagesRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of UsagesRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public UsagesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets the current usage information as well as limits for AML resources for given subscription and location. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListRequest(location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListUsagesResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListUsagesResult.DeserializeListUsagesResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets the current usage information as well as limits for AML resources for given subscription and location. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// is null. + public Response List(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListRequest(location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListUsagesResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListUsagesResult.DeserializeListUsagesResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets the current usage information as well as limits for AML resources for given subscription and location. + /// The URL to the next page of results. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// or is null. + public async Task> ListNextPageAsync(string nextLink, string location, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListNextPageRequest(nextLink, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListUsagesResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListUsagesResult.DeserializeListUsagesResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets the current usage information as well as limits for AML resources for given subscription and location. + /// The URL to the next page of results. + /// The location for which resource usage is queried. + /// The cancellation token to use. + /// or is null. + public Response ListNextPage(string nextLink, string location, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListNextPageRequest(nextLink, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListUsagesResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListUsagesResult.DeserializeListUsagesResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesOperations.cs new file mode 100644 index 000000000000..89c5c8b6ea14 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesOperations.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The VirtualMachineSizes service client. + public partial class VirtualMachineSizesOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal VirtualMachineSizesRestOperations RestClient { get; } + /// Initializes a new instance of VirtualMachineSizesOperations for mocking. + protected VirtualMachineSizesOperations() + { + } + /// Initializes a new instance of VirtualMachineSizesOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal VirtualMachineSizesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new VirtualMachineSizesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Returns supported VM Sizes in a location. + /// The location upon which virtual-machine-sizes is queried. + /// The cancellation token to use. + public virtual async Task> ListAsync(string location, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("VirtualMachineSizesOperations.List"); + scope.Start(); + try + { + return await RestClient.ListAsync(location, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Returns supported VM Sizes in a location. + /// The location upon which virtual-machine-sizes is queried. + /// The cancellation token to use. + public virtual Response List(string location, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("VirtualMachineSizesOperations.List"); + scope.Start(); + try + { + return RestClient.List(location, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesRestOperations.cs new file mode 100644 index 000000000000..152a604e41e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/VirtualMachineSizesRestOperations.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class VirtualMachineSizesRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of VirtualMachineSizesRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public VirtualMachineSizesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/vmSizes", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Returns supported VM Sizes in a location. + /// The location upon which virtual-machine-sizes is queried. + /// The cancellation token to use. + /// is null. + public async Task> ListAsync(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListRequest(location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VirtualMachineSizeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = VirtualMachineSizeListResult.DeserializeVirtualMachineSizeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Returns supported VM Sizes in a location. + /// The location upon which virtual-machine-sizes is queried. + /// The cancellation token to use. + /// is null. + public Response List(string location, CancellationToken cancellationToken = default) + { + if (location == null) + { + throw new ArgumentNullException(nameof(location)); + } + + using var message = CreateListRequest(location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VirtualMachineSizeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = VirtualMachineSizeListResult.DeserializeVirtualMachineSizeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsOperations.cs new file mode 100644 index 000000000000..75eeaaa84451 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsOperations.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The WorkspaceConnections service client. + public partial class WorkspaceConnectionsOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal WorkspaceConnectionsRestOperations RestClient { get; } + /// Initializes a new instance of WorkspaceConnectionsOperations for mocking. + protected WorkspaceConnectionsOperations() + { + } + /// Initializes a new instance of WorkspaceConnectionsOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal WorkspaceConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new WorkspaceConnectionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Add a new workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + public virtual async Task> CreateAsync(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.Create"); + scope.Start(); + try + { + return await RestClient.CreateAsync(resourceGroupName, workspaceName, connectionName, parameters, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a new workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + public virtual Response Create(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.Create"); + scope.Start(); + try + { + return RestClient.Create(resourceGroupName, workspaceName, connectionName, parameters, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the detail of a workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(resourceGroupName, workspaceName, connectionName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the detail of a workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + public virtual Response Get(string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(resourceGroupName, workspaceName, connectionName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + public virtual async Task DeleteAsync(string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.Delete"); + scope.Start(); + try + { + return await RestClient.DeleteAsync(resourceGroupName, workspaceName, connectionName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Delete a workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + public virtual Response Delete(string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.Delete"); + scope.Start(); + try + { + return RestClient.Delete(resourceGroupName, workspaceName, connectionName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all connections under a AML workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Target of the workspace connection. + /// Category of the workspace connection. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, target, category, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); + } + + /// List all connections under a AML workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Target of the workspace connection. + /// Category of the workspace connection. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceConnectionsOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, target, category, cancellationToken); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, null); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsRestOperations.cs new file mode 100644 index 000000000000..c1aecf918897 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceConnectionsRestOperations.cs @@ -0,0 +1,440 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class WorkspaceConnectionsRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of WorkspaceConnectionsRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public WorkspaceConnectionsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName, string target, string category) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/connections", false); + uri.AppendQuery("api-version", apiVersion, true); + if (target != null) + { + uri.AppendQuery("target", target, true); + } + if (category != null) + { + uri.AppendQuery("category", category, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// List all connections under a AML workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Target of the workspace connection. + /// Category of the workspace connection. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, target, category); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PaginatedWorkspaceConnectionsList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PaginatedWorkspaceConnectionsList.DeserializePaginatedWorkspaceConnectionsList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// List all connections under a AML workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Target of the workspace connection. + /// Category of the workspace connection. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName, target, category); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PaginatedWorkspaceConnectionsList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PaginatedWorkspaceConnectionsList.DeserializePaginatedWorkspaceConnectionsList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/connections/", false); + uri.AppendPath(connectionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(parameters); + request.Content = content; + return message; + } + + /// Add a new workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + /// , , , or is null. + public async Task> CreateAsync(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (connectionName == null) + { + throw new ArgumentNullException(nameof(connectionName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateCreateRequest(resourceGroupName, workspaceName, connectionName, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkspaceConnection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkspaceConnection.DeserializeWorkspaceConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Add a new workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + /// , , , or is null. + public Response Create(string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionDto parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (connectionName == null) + { + throw new ArgumentNullException(nameof(connectionName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateCreateRequest(resourceGroupName, workspaceName, connectionName, parameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkspaceConnection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkspaceConnection.DeserializeWorkspaceConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName, string connectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/connections/", false); + uri.AppendPath(connectionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Get the detail of a workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// , , or is null. + public async Task> GetAsync(string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (connectionName == null) + { + throw new ArgumentNullException(nameof(connectionName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, connectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkspaceConnection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkspaceConnection.DeserializeWorkspaceConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get the detail of a workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// , , or is null. + public Response Get(string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (connectionName == null) + { + throw new ArgumentNullException(nameof(connectionName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName, connectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkspaceConnection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkspaceConnection.DeserializeWorkspaceConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string resourceGroupName, string workspaceName, string connectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/connections/", false); + uri.AppendPath(connectionName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Delete a workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// , , or is null. + public async Task DeleteAsync(string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (connectionName == null) + { + throw new ArgumentNullException(nameof(connectionName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, connectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Delete a workspace connection. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// , , or is null. + public Response Delete(string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (connectionName == null) + { + throw new ArgumentNullException(nameof(connectionName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName, connectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesOperations.cs new file mode 100644 index 000000000000..5f370659b960 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesOperations.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The WorkspaceFeatures service client. + public partial class WorkspaceFeaturesOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal WorkspaceFeaturesRestOperations RestClient { get; } + /// Initializes a new instance of WorkspaceFeaturesOperations for mocking. + protected WorkspaceFeaturesOperations() + { + } + /// Initializes a new instance of WorkspaceFeaturesOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal WorkspaceFeaturesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new WorkspaceFeaturesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Lists all enabled features for a workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual AsyncPageable ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceFeaturesOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceFeaturesOperations.List"); + scope.Start(); + try + { + var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists all enabled features for a workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual Pageable List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceFeaturesOperations.List"); + scope.Start(); + try + { + var response = RestClient.List(resourceGroupName, workspaceName, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspaceFeaturesOperations.List"); + scope.Start(); + try + { + var response = RestClient.ListNextPage(nextLink, resourceGroupName, workspaceName, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesRestOperations.cs new file mode 100644 index 000000000000..599fd9dc68d1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspaceFeaturesRestOperations.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class WorkspaceFeaturesRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of WorkspaceFeaturesRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public WorkspaceFeaturesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateListRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/features", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all enabled features for a workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListAmlUserFeatureResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListAmlUserFeatureResult.DeserializeListAmlUserFeatureResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all enabled features for a workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response List(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListAmlUserFeatureResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListAmlUserFeatureResult.DeserializeListAmlUserFeatureResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all enabled features for a workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> ListNextPageAsync(string nextLink, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListAmlUserFeatureResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListAmlUserFeatureResult.DeserializeListAmlUserFeatureResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all enabled features for a workspace. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response ListNextPage(string nextLink, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListNextPageRequest(nextLink, resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListAmlUserFeatureResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListAmlUserFeatureResult.DeserializeListAmlUserFeatureResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesCreateOrUpdateOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesCreateOrUpdateOperation.cs new file mode 100644 index 000000000000..5db9ab2aeb24 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesCreateOrUpdateOperation.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// Creates or updates a workspace with the specified parameters. + public partial class WorkspacesCreateOrUpdateOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal WorkspacesCreateOrUpdateOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "WorkspacesCreateOrUpdateOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override Workspace Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + Workspace IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return Workspace.DeserializeWorkspace(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return Workspace.DeserializeWorkspace(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDeleteOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDeleteOperation.cs new file mode 100644 index 000000000000..ae820454cd96 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesDeleteOperation.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// Deletes a machine learning workspace. + public partial class WorkspacesDeleteOperation : Operation, IOperationSource + { + private readonly ArmOperationHelpers _operation; + internal WorkspacesDeleteOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "WorkspacesDeleteOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override Response Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + Response IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + return response; + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + return await new ValueTask(response).ConfigureAwait(false); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesOperations.cs new file mode 100644 index 000000000000..8a8895ac9dd5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesOperations.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + /// The Workspaces service client. + public partial class WorkspacesOperations + { + private readonly ClientDiagnostics _clientDiagnostics; + private readonly HttpPipeline _pipeline; + internal WorkspacesRestOperations RestClient { get; } + /// Initializes a new instance of WorkspacesOperations for mocking. + protected WorkspacesOperations() + { + } + /// Initializes a new instance of WorkspacesOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + internal WorkspacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + RestClient = new WorkspacesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion); + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + /// Gets the properties of the specified machine learning workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> GetAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.Get"); + scope.Start(); + try + { + return await RestClient.GetAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the properties of the specified machine learning workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response Get(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.Get"); + scope.Start(); + try + { + return RestClient.Get(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates a machine learning workspace with the specified parameters. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The parameters for updating a machine learning workspace. + /// The cancellation token to use. + public virtual async Task> UpdateAsync(string resourceGroupName, string workspaceName, WorkspaceUpdateParameters parameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.Update"); + scope.Start(); + try + { + return await RestClient.UpdateAsync(resourceGroupName, workspaceName, parameters, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates a machine learning workspace with the specified parameters. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The parameters for updating a machine learning workspace. + /// The cancellation token to use. + public virtual Response Update(string resourceGroupName, string workspaceName, WorkspaceUpdateParameters parameters, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.Update"); + scope.Start(); + try + { + return RestClient.Update(resourceGroupName, workspaceName, parameters, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task> ListKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListKeys"); + scope.Start(); + try + { + return await RestClient.ListKeysAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response ListKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListKeys"); + scope.Start(); + try + { + return RestClient.ListKeys(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual async Task ResyncKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ResyncKeys"); + scope.Start(); + try + { + return await RestClient.ResyncKeysAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + public virtual Response ResyncKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ResyncKeys"); + scope.Start(); + try + { + return RestClient.ResyncKeys(resourceGroupName, workspaceName, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists all the available machine learning workspaces under the specified resource group. + /// Name of the resource group in which workspace is located. + /// Continuation token for pagination. + /// The cancellation token to use. + /// is null. + public virtual AsyncPageable ListByResourceGroupAsync(string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListByResourceGroup"); + scope.Start(); + try + { + var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListByResourceGroup"); + scope.Start(); + try + { + var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists all the available machine learning workspaces under the specified resource group. + /// Name of the resource group in which workspace is located. + /// Continuation token for pagination. + /// The cancellation token to use. + /// is null. + public virtual Pageable ListByResourceGroup(string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListByResourceGroup"); + scope.Start(); + try + { + var response = RestClient.ListByResourceGroup(resourceGroupName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListByResourceGroup"); + scope.Start(); + try + { + var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists all the available machine learning workspaces under the specified subscription. + /// Continuation token for pagination. + /// The cancellation token to use. + public virtual AsyncPageable ListBySubscriptionAsync(string skiptoken = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListBySubscription"); + scope.Start(); + try + { + var response = await RestClient.ListBySubscriptionAsync(skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListBySubscription"); + scope.Start(); + try + { + var response = await RestClient.ListBySubscriptionNextPageAsync(nextLink, skiptoken, cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Lists all the available machine learning workspaces under the specified subscription. + /// Continuation token for pagination. + /// The cancellation token to use. + public virtual Pageable ListBySubscription(string skiptoken = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListBySubscription"); + scope.Start(); + try + { + var response = RestClient.ListBySubscription(skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.ListBySubscription"); + scope.Start(); + try + { + var response = RestClient.ListBySubscriptionNextPage(nextLink, skiptoken, cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// Creates or updates a workspace with the specified parameters. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The parameters for creating or updating a machine learning workspace. + /// The cancellation token to use. + /// , , or is null. + public virtual async Task StartCreateOrUpdateAsync(string resourceGroupName, string workspaceName, Workspace parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartCreateOrUpdate"); + scope.Start(); + try + { + var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, cancellationToken).ConfigureAwait(false); + return new WorkspacesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, parameters).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates or updates a workspace with the specified parameters. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The parameters for creating or updating a machine learning workspace. + /// The cancellation token to use. + /// , , or is null. + public virtual WorkspacesCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string workspaceName, Workspace parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartCreateOrUpdate"); + scope.Start(); + try + { + var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, workspaceName, parameters, cancellationToken); + return new WorkspacesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, parameters).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a machine learning workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual async Task StartDeleteAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartDelete"); + scope.Start(); + try + { + var originalResponse = await RestClient.DeleteAsync(resourceGroupName, workspaceName, cancellationToken).ConfigureAwait(false); + return new WorkspacesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, workspaceName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Deletes a machine learning workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public virtual WorkspacesDeleteOperation StartDelete(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var scope = _clientDiagnostics.CreateScope("WorkspacesOperations.StartDelete"); + scope.Start(); + try + { + var originalResponse = RestClient.Delete(resourceGroupName, workspaceName, cancellationToken); + return new WorkspacesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, workspaceName).Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesRestOperations.cs new file mode 100644 index 000000000000..5ef9d8996f54 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/Generated/WorkspacesRestOperations.cs @@ -0,0 +1,847 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.MachineLearningServices.Models; + +namespace Azure.ResourceManager.MachineLearningServices +{ + internal partial class WorkspacesRestOperations + { + private string subscriptionId; + private Uri endpoint; + private string apiVersion; + private ClientDiagnostics _clientDiagnostics; + private HttpPipeline _pipeline; + + /// Initializes a new instance of WorkspacesRestOperations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Azure subscription identifier. + /// server parameter. + /// Api Version. + /// or is null. + public WorkspacesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-09-01-preview") + { + if (subscriptionId == null) + { + throw new ArgumentNullException(nameof(subscriptionId)); + } + endpoint ??= new Uri("https://management.azure.com"); + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = apiVersion; + _clientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + } + + internal HttpMessage CreateGetRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Gets the properties of the specified machine learning workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> GetAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Workspace value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Workspace.DeserializeWorkspace(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Gets the properties of the specified machine learning workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response Get(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateGetRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Workspace value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Workspace.DeserializeWorkspace(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string workspaceName, Workspace parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(parameters); + request.Content = content; + return message; + } + + /// Creates or updates a workspace with the specified parameters. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The parameters for creating or updating a machine learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task CreateOrUpdateAsync(string resourceGroupName, string workspaceName, Workspace parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Creates or updates a workspace with the specified parameters. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The parameters for creating or updating a machine learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response CreateOrUpdate(string resourceGroupName, string workspaceName, Workspace parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateCreateOrUpdateRequest(resourceGroupName, workspaceName, parameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Deletes a machine learning workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task DeleteAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Deletes a machine learning workspace. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response Delete(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateDeleteRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string resourceGroupName, string workspaceName, WorkspaceUpdateParameters parameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(parameters); + request.Content = content; + return message; + } + + /// Updates a machine learning workspace with the specified parameters. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The parameters for updating a machine learning workspace. + /// The cancellation token to use. + /// , , or is null. + public async Task> UpdateAsync(string resourceGroupName, string workspaceName, WorkspaceUpdateParameters parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateUpdateRequest(resourceGroupName, workspaceName, parameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Workspace value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Workspace.DeserializeWorkspace(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Updates a machine learning workspace with the specified parameters. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The parameters for updating a machine learning workspace. + /// The cancellation token to use. + /// , , or is null. + public Response Update(string resourceGroupName, string workspaceName, WorkspaceUpdateParameters parameters, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + if (parameters == null) + { + throw new ArgumentNullException(nameof(parameters)); + } + + using var message = CreateUpdateRequest(resourceGroupName, workspaceName, parameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Workspace value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Workspace.DeserializeWorkspace(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string resourceGroupName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all the available machine learning workspaces under the specified resource group. + /// Name of the resource group in which workspace is located. + /// Continuation token for pagination. + /// The cancellation token to use. + /// is null. + public async Task> ListByResourceGroupAsync(string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + + using var message = CreateListByResourceGroupRequest(resourceGroupName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all the available machine learning workspaces under the specified resource group. + /// Name of the resource group in which workspace is located. + /// Continuation token for pagination. + /// The cancellation token to use. + /// is null. + public Response ListByResourceGroup(string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + + using var message = CreateListByResourceGroupRequest(resourceGroupName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListKeysRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/listKeys", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task> ListKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListKeysRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListWorkspaceKeysResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListWorkspaceKeysResult.DeserializeListWorkspaceKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response ListKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateListKeysRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListWorkspaceKeysResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListWorkspaceKeysResult.DeserializeListWorkspaceKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateResyncKeysRequest(string resourceGroupName, string workspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); + uri.AppendPath("/resyncKeys", false); + uri.AppendQuery("api-version", apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public async Task ResyncKeysAsync(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateResyncKeysRequest(resourceGroupName, workspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Name of the resource group in which workspace is located. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + public Response ResyncKeys(string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + { + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + if (workspaceName == null) + { + throw new ArgumentNullException(nameof(workspaceName)); + } + + using var message = CreateResyncKeysRequest(resourceGroupName, workspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); + uri.AppendQuery("api-version", apiVersion, true); + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all the available machine learning workspaces under the specified subscription. + /// Continuation token for pagination. + /// The cancellation token to use. + public async Task> ListBySubscriptionAsync(string skiptoken = null, CancellationToken cancellationToken = default) + { + using var message = CreateListBySubscriptionRequest(skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all the available machine learning workspaces under the specified subscription. + /// Continuation token for pagination. + /// The cancellation token to use. + public Response ListBySubscription(string skiptoken = null, CancellationToken cancellationToken = default) + { + using var message = CreateListBySubscriptionRequest(skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string resourceGroupName, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all the available machine learning workspaces under the specified resource group. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceGroupName, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all the available machine learning workspaces under the specified resource group. + /// The URL to the next page of results. + /// Name of the resource group in which workspace is located. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + public Response ListByResourceGroupNextPage(string nextLink, string resourceGroupName, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + if (resourceGroupName == null) + { + throw new ArgumentNullException(nameof(resourceGroupName)); + } + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, resourceGroupName, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + /// Lists all the available machine learning workspaces under the specified subscription. + /// The URL to the next page of results. + /// Continuation token for pagination. + /// The cancellation token to use. + /// is null. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Lists all the available machine learning workspaces under the specified subscription. + /// The URL to the next page of results. + /// Continuation token for pagination. + /// The cancellation token to use. + /// is null. + public Response ListBySubscriptionNextPage(string nextLink, string skiptoken = null, CancellationToken cancellationToken = default) + { + if (nextLink == null) + { + throw new ArgumentNullException(nameof(nextLink)); + } + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkspaceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/autorest.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/autorest.md new file mode 100644 index 000000000000..bd05d228dc82 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/src/autorest.md @@ -0,0 +1,13 @@ +# Generated code configuration + +Run `dotnet build /t:GenerateCode` to generate code. + +``` yaml + +azure-arm: true +require: https://raw.githubusercontent.com/forteddyt/azure-rest-api-specs/db218390cc57f2509db0e88d8d5ffd1872aa9435/specification/machinelearningservices/resource-manager/readme.md +modelerfour: + lenient-model-deduplication: true +namespace: Azure.ResourceManager.MachineLearningServices + +``` \ No newline at end of file diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/tests/Azure.ResourceManager.MachineLearningServices.Tests.csproj b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/tests/Azure.ResourceManager.MachineLearningServices.Tests.csproj new file mode 100644 index 000000000000..614b27af9c43 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearningServices/tests/Azure.ResourceManager.MachineLearningServices.Tests.csproj @@ -0,0 +1,10 @@ + + + $(RequiredTargetFrameworks) + + + + + + + diff --git a/sdk/machinelearningservices/ci.yml b/sdk/machinelearningservices/ci.yml index 48e72d4371cb..1a227ca46e3f 100644 --- a/sdk/machinelearningservices/ci.yml +++ b/sdk/machinelearningservices/ci.yml @@ -1,6 +1,4 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -# Azure.ResourceManager.MachineLearningServices - trigger: branches: include: diff --git a/sdk/machinelearningservices/test-resources.json b/sdk/machinelearningservices/test-resources.json new file mode 100644 index 000000000000..23b396badd6e --- /dev/null +++ b/sdk/machinelearningservices/test-resources.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [ + ] +} \ No newline at end of file diff --git a/sdk/machinelearningservices/tests.yml b/sdk/machinelearningservices/tests.yml index bba8de624f01..ad59191a8dc3 100644 --- a/sdk/machinelearningservices/tests.yml +++ b/sdk/machinelearningservices/tests.yml @@ -1,4 +1,3 @@ -# Azure.ResourceManager.MachineLearningServices trigger: none extends: