Exemple #1
0
 internal PrivateEndpointConnectionProxyData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, string eTag, RemotePrivateEndpoint remotePrivateEndpoint, PrivateEndpointConnectionProxyProvisioningState?provisioningState, string status) : base(id, name, type, systemData)
 {
     ETag = eTag;
     RemotePrivateEndpoint = remotePrivateEndpoint;
     ProvisioningState     = provisioningState;
     Status = status;
 }
Exemple #2
0
 internal PrivateEndpointConnectionProxyProperties(string eTag, RemotePrivateEndpoint remotePrivateEndpoint, PrivateEndpointConnectionProxyProvisioningState?provisioningState, string status)
 {
     ETag = eTag;
     RemotePrivateEndpoint = remotePrivateEndpoint;
     ProvisioningState     = provisioningState;
     Status = status;
 }
 internal PrivateEndpointConnectionProxyProperties(string eTag, RemotePrivateEndpoint remotePrivateEndpoint, string status)
 {
     ETag = eTag;
     RemotePrivateEndpoint = remotePrivateEndpoint;
     Status = status;
 }
        internal static PrivateEndpointConnectionProxyData DeserializePrivateEndpointConnectionProxyData(JsonElement element)
        {
            Optional <string> eTag = default;
            Optional <RemotePrivateEndpoint> remotePrivateEndpoint = default;
            Optional <string>  status     = default;
            ResourceIdentifier id         = default;
            string             name       = default;
            ResourceType       type       = default;
            SystemData         systemData = default;
            Optional <PrivateEndpointConnectionProxyProvisioningState> provisioningState = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("eTag"))
                {
                    eTag = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("remotePrivateEndpoint"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    remotePrivateEndpoint = RemotePrivateEndpoint.DeserializeRemotePrivateEndpoint(property.Value);
                    continue;
                }
                if (property.NameEquals("status"))
                {
                    status = 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 = 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("provisioningState"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            provisioningState = new PrivateEndpointConnectionProxyProvisioningState(property0.Value.GetString());
                            continue;
                        }
                    }
                    continue;
                }
            }
            return(new PrivateEndpointConnectionProxyData(id, name, type, systemData, Optional.ToNullable(provisioningState), eTag.Value, remotePrivateEndpoint.Value, status.Value));
        }