internal VpnSiteLinkData(ResourceIdentifier id, string name, ResourceType?resourceType, ETag?etag, VpnLinkProviderProperties linkProperties, string ipAddress, string fqdn, VpnLinkBgpSettings bgpProperties, NetworkProvisioningState?provisioningState) : base(id, name, resourceType) { Etag = etag; LinkProperties = linkProperties; IPAddress = ipAddress; Fqdn = fqdn; BgpProperties = bgpProperties; ProvisioningState = provisioningState; }
internal VpnSiteLinkData(string id, string etag, string name, string resourceType, VpnLinkProviderProperties linkProperties, string ipAddress, string fqdn, VpnLinkBgpSettings bgpProperties, ProvisioningState?provisioningState) : base(id) { Etag = etag; Name = name; ResourceType = resourceType; LinkProperties = linkProperties; IPAddress = ipAddress; Fqdn = fqdn; BgpProperties = bgpProperties; ProvisioningState = provisioningState; }
internal static VpnSiteLinkData DeserializeVpnSiteLinkData(JsonElement element) { Optional <string> etag = default; Optional <string> name = default; Optional <string> type = default; Optional <string> id = default; Optional <VpnLinkProviderProperties> linkProperties = default; Optional <string> ipAddress = default; Optional <string> fqdn = default; Optional <VpnLinkBgpSettings> bgpProperties = default; Optional <ProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("etag")) { etag = 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("id")) { id = 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("linkProperties")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } linkProperties = VpnLinkProviderProperties.DeserializeVpnLinkProviderProperties(property0.Value); continue; } if (property0.NameEquals("ipAddress")) { ipAddress = property0.Value.GetString(); continue; } if (property0.NameEquals("fqdn")) { fqdn = property0.Value.GetString(); continue; } if (property0.NameEquals("bgpProperties")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } bgpProperties = VpnLinkBgpSettings.DeserializeVpnLinkBgpSettings(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new VpnSiteLinkData(id.Value, etag.Value, name.Value, type.Value, linkProperties.Value, ipAddress.Value, fqdn.Value, bgpProperties.Value, Optional.ToNullable(provisioningState))); }