internal BatchDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary <string, string> tags, AzureLocation location, ManagedServiceIdentity identity, string kind, BatchDeploymentProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Kind = kind; Properties = properties; Sku = sku; }
internal MachineLearningWorkspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, AzureLocation?location, IDictionary <string, string> tags, MachineLearningSku sku, string workspaceId, string description, string friendlyName, string keyVault, string applicationInsights, string containerRegistry, string storageAccount, Uri discoveryUri, ProvisioningState?provisioningState, EncryptionProperty encryption, bool?hbiWorkspace, string serviceProvisionedResourceGroup, int?privateLinkCount, string imageBuildCompute, bool?allowPublicAccessWhenBehindVnet, PublicNetworkAccess?publicNetworkAccess, IReadOnlyList <MachineLearningPrivateEndpointConnectionData> privateEndpointConnections, IList <SharedPrivateLinkResource> sharedPrivateLinkResources, NotebookResourceInfo notebookInfo, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string primaryUserAssignedIdentity, Guid?tenantId, bool?storageHnsEnabled, Uri mlFlowTrackingUri) : base(id, name, resourceType, systemData) { Identity = identity; Location = location; Tags = tags; Sku = sku; WorkspaceId = workspaceId; Description = description; FriendlyName = friendlyName; KeyVault = keyVault; ApplicationInsights = applicationInsights; ContainerRegistry = containerRegistry; StorageAccount = storageAccount; DiscoveryUri = discoveryUri; ProvisioningState = provisioningState; Encryption = encryption; HbiWorkspace = hbiWorkspace; ServiceProvisionedResourceGroup = serviceProvisionedResourceGroup; PrivateLinkCount = privateLinkCount; ImageBuildCompute = imageBuildCompute; AllowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; PublicNetworkAccess = publicNetworkAccess; PrivateEndpointConnections = privateEndpointConnections; SharedPrivateLinkResources = sharedPrivateLinkResources; NotebookInfo = notebookInfo; ServiceManagedResourcesSettings = serviceManagedResourcesSettings; PrimaryUserAssignedIdentity = primaryUserAssignedIdentity; TenantId = tenantId; StorageHnsEnabled = storageHnsEnabled; MlFlowTrackingUri = mlFlowTrackingUri; }
internal MachineLearningComputeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, string location, IDictionary <string, string> tags, MachineLearningSku sku, Compute properties) : base(id, name, resourceType, systemData) { Identity = identity; Location = location; Tags = tags; Sku = sku; Properties = properties; }
internal MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedServiceIdentity identity, AzureLocation?location, IDictionary <string, string> tags, MachineLearningSku sku, PrivateEndpoint privateEndpoint, MachineLearningPrivateLinkServiceConnectionState connectionState, MachineLearningPrivateEndpointConnectionProvisioningState?provisioningState) : base(id, name, resourceType, systemData) { Identity = identity; Location = location; Tags = tags; Sku = sku; PrivateEndpoint = privateEndpoint; ConnectionState = connectionState; ProvisioningState = provisioningState; }
internal static OnlineDeploymentData DeserializeOnlineDeploymentData(JsonElement element) { Optional <ManagedServiceIdentity> identity = default; Optional <string> kind = default; OnlineDeploymentProperties properties = default; Optional <MachineLearningSku> sku = default; IDictionary <string, string> tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; identity = JsonSerializer.Deserialize <ManagedServiceIdentity>(property.Value.ToString(), serializeOptions); continue; } if (property.NameEquals("kind")) { kind = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { properties = OnlineDeploymentProperties.DeserializeOnlineDeploymentProperties(property.Value); continue; } if (property.NameEquals("sku")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); continue; } if (property.NameEquals("tags")) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); foreach (var property0 in property.Value.EnumerateObject()) { dictionary.Add(property0.Name, property0.Value.GetString()); } tags = dictionary; continue; } if (property.NameEquals("location")) { location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } } return(new OnlineDeploymentData(id, name, type, systemData, tags, location, identity, kind.Value, properties, sku.Value)); }
internal static MachineLearningPrivateEndpointConnectionData DeserializeMachineLearningPrivateEndpointConnectionData(JsonElement element) { Optional <ManagedServiceIdentity> identity = default; Optional <AzureLocation> location = default; Optional <IDictionary <string, string> > tags = default; Optional <MachineLearningSku> sku = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <PrivateEndpoint> privateEndpoint = default; Optional <MachineLearningPrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default; Optional <MachineLearningPrivateEndpointConnectionProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; identity = JsonSerializer.Deserialize <ManagedServiceIdentity>(property.Value.ToString(), serializeOptions); continue; } if (property.NameEquals("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, string> dictionary = new Dictionary <string, string>(); 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 = MachineLearningSku.DeserializeMachineLearningSku(property.Value); continue; } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); 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 = MachineLearningPrivateLinkServiceConnectionState.DeserializeMachineLearningPrivateLinkServiceConnectionState(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new MachineLearningPrivateEndpointConnectionProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new MachineLearningPrivateEndpointConnectionData(id, name, type, systemData, identity, Optional.ToNullable(location), Optional.ToDictionary(tags), sku.Value, privateEndpoint.Value, privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState))); }
internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspaceData(JsonElement element) { Optional <ManagedServiceIdentity> identity = default; Optional <AzureLocation> location = default; Optional <IDictionary <string, string> > tags = default; Optional <MachineLearningSku> sku = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <string> workspaceId = default; Optional <string> description = default; Optional <string> friendlyName = default; Optional <string> keyVault = default; Optional <string> applicationInsights = default; Optional <string> containerRegistry = default; Optional <string> storageAccount = default; Optional <Uri> discoveryUrl = default; Optional <ProvisioningState> provisioningState = default; Optional <EncryptionProperty> encryption = default; Optional <bool> hbiWorkspace = default; Optional <string> serviceProvisionedResourceGroup = default; Optional <int> privateLinkCount = default; Optional <string> imageBuildCompute = default; Optional <bool> allowPublicAccessWhenBehindVnet = default; Optional <PublicNetworkAccess> publicNetworkAccess = default; Optional <IReadOnlyList <MachineLearningPrivateEndpointConnectionData> > privateEndpointConnections = default; Optional <IList <SharedPrivateLinkResource> > sharedPrivateLinkResources = default; Optional <NotebookResourceInfo> notebookInfo = default; Optional <ServiceManagedResourcesSettings> serviceManagedResourcesSettings = default; Optional <string> primaryUserAssignedIdentity = default; Optional <Guid> tenantId = default; Optional <bool> storageHnsEnabled = default; Optional <Uri> mlFlowTrackingUri = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; identity = JsonSerializer.Deserialize <ManagedServiceIdentity>(property.Value.ToString(), serializeOptions); continue; } if (property.NameEquals("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } location = new AzureLocation(property.Value.GetString()); continue; } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, string> dictionary = new Dictionary <string, string>(); 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 = MachineLearningSku.DeserializeMachineLearningSku(property.Value); continue; } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); 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("keyVault")) { keyVault = property0.Value.GetString(); continue; } if (property0.NameEquals("applicationInsights")) { applicationInsights = property0.Value.GetString(); continue; } if (property0.NameEquals("containerRegistry")) { if (property0.Value.ValueKind == JsonValueKind.Null) { containerRegistry = null; continue; } containerRegistry = property0.Value.GetString(); continue; } if (property0.NameEquals("storageAccount")) { storageAccount = property0.Value.GetString(); continue; } if (property0.NameEquals("discoveryUrl")) { if (property0.Value.ValueKind == JsonValueKind.Null) { discoveryUrl = null; continue; } discoveryUrl = new Uri(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("publicNetworkAccess")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } publicNetworkAccess = new PublicNetworkAccess(property0.Value.GetString()); continue; } if (property0.NameEquals("privateEndpointConnections")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <MachineLearningPrivateEndpointConnectionData> array = new List <MachineLearningPrivateEndpointConnectionData>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(item)); } privateEndpointConnections = array; continue; } if (property0.NameEquals("sharedPrivateLinkResources")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <SharedPrivateLinkResource> array = new List <SharedPrivateLinkResource>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(SharedPrivateLinkResource.DeserializeSharedPrivateLinkResource(item)); } sharedPrivateLinkResources = array; continue; } if (property0.NameEquals("notebookInfo")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } notebookInfo = NotebookResourceInfo.DeserializeNotebookResourceInfo(property0.Value); continue; } if (property0.NameEquals("serviceManagedResourcesSettings")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } serviceManagedResourcesSettings = ServiceManagedResourcesSettings.DeserializeServiceManagedResourcesSettings(property0.Value); continue; } if (property0.NameEquals("primaryUserAssignedIdentity")) { primaryUserAssignedIdentity = property0.Value.GetString(); continue; } if (property0.NameEquals("tenantId")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } tenantId = property0.Value.GetGuid(); continue; } if (property0.NameEquals("storageHnsEnabled")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } storageHnsEnabled = property0.Value.GetBoolean(); continue; } if (property0.NameEquals("mlFlowTrackingUri")) { if (property0.Value.ValueKind == JsonValueKind.Null) { mlFlowTrackingUri = null; continue; } mlFlowTrackingUri = new Uri(property0.Value.GetString()); continue; } } continue; } } return(new MachineLearningWorkspaceData(id, name, type, systemData, identity, Optional.ToNullable(location), Optional.ToDictionary(tags), sku.Value, workspaceId.Value, description.Value, friendlyName.Value, 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.ToNullable(publicNetworkAccess), Optional.ToList(privateEndpointConnections), Optional.ToList(sharedPrivateLinkResources), notebookInfo.Value, serviceManagedResourcesSettings.Value, primaryUserAssignedIdentity.Value, Optional.ToNullable(tenantId), Optional.ToNullable(storageHnsEnabled), mlFlowTrackingUri.Value)); }