Пример #1
0
 internal CosmosDBPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PrivateEndpointProperty privateEndpoint, CosmosDBPrivateLinkServiceConnectionStateProperty connectionState, string groupId, string provisioningState) : base(id, name, resourceType, systemData)
 {
     PrivateEndpoint   = privateEndpoint;
     ConnectionState   = connectionState;
     GroupId           = groupId;
     ProvisioningState = provisioningState;
 }
 internal PrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType type, PrivateEndpointProperty privateEndpoint, PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState, string groupId, string provisioningState) : base(id, name, type)
 {
     PrivateEndpoint = privateEndpoint;
     PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
     GroupId           = groupId;
     ProvisioningState = provisioningState;
 }
Пример #3
0
 internal PrivateEndpointConnectionAutoGenerated(string id, string name, string type, PrivateEndpointProperty privateEndpoint, PrivateLinkServiceConnectionStatePropertyAutoGenerated privateLinkServiceConnectionState, string groupId, string provisioningState) : base(id, name, type)
 {
     PrivateEndpoint = privateEndpoint;
     PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
     GroupId           = groupId;
     ProvisioningState = provisioningState;
 }
Пример #4
0
        internal static CosmosDBPrivateEndpointConnectionData DeserializeCosmosDBPrivateEndpointConnectionData(JsonElement element)
        {
            ResourceIdentifier id         = default;
            string             name       = default;
            ResourceType       type       = default;
            SystemData         systemData = default;
            Optional <PrivateEndpointProperty> privateEndpoint = default;
            Optional <CosmosDBPrivateLinkServiceConnectionStateProperty> privateLinkServiceConnectionState = default;
            Optional <string> groupId           = default;
            Optional <string> provisioningState = default;

            foreach (var property in element.EnumerateObject())
            {
                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 = PrivateEndpointProperty.DeserializePrivateEndpointProperty(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("privateLinkServiceConnectionState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            privateLinkServiceConnectionState = CosmosDBPrivateLinkServiceConnectionStateProperty.DeserializeCosmosDBPrivateLinkServiceConnectionStateProperty(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("groupId"))
                        {
                            groupId = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("provisioningState"))
                        {
                            provisioningState = property0.Value.GetString();
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new CosmosDBPrivateEndpointConnectionData(id, name, type, systemData, privateEndpoint.Value, privateLinkServiceConnectionState.Value, groupId.Value, provisioningState.Value));
        }
 internal PrivateEndpointConnection(string id, string name, string type, PrivateEndpointProperty privateEndpoint, PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) : base(id, name, type)
 {
     PrivateEndpoint = privateEndpoint;
     PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
 }
Пример #6
0
 internal PrivateEndpointConnectionProperties(PrivateEndpointProperty privateEndpoint, PrivateLinkServiceConnectionStatePropertyAutoGenerated privateLinkServiceConnectionState, PrivateEndpointProvisioningState?provisioningState)
 {
     PrivateEndpoint = privateEndpoint;
     PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
     ProvisioningState = provisioningState;
 }