internal static PacketCaptureData DeserializePacketCaptureData(JsonElement element) { Optional <string> name = default; Optional <string> id = default; Optional <string> etag = default; Optional <string> target = default; Optional <long> bytesToCapturePerPacket = default; Optional <long> totalBytesPerSession = default; Optional <int> timeLimitInSeconds = default; Optional <PacketCaptureStorageLocation> storageLocation = default; Optional <IReadOnlyList <PacketCaptureFilter> > filters = default; Optional <ProvisioningState> provisioningState = 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; } if (property.NameEquals("etag")) { etag = 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("target")) { target = property0.Value.GetString(); continue; } if (property0.NameEquals("bytesToCapturePerPacket")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } bytesToCapturePerPacket = property0.Value.GetInt64(); continue; } if (property0.NameEquals("totalBytesPerSession")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } totalBytesPerSession = property0.Value.GetInt64(); continue; } if (property0.NameEquals("timeLimitInSeconds")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } timeLimitInSeconds = property0.Value.GetInt32(); continue; } if (property0.NameEquals("storageLocation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } storageLocation = PacketCaptureStorageLocation.DeserializePacketCaptureStorageLocation(property0.Value); continue; } if (property0.NameEquals("filters")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <PacketCaptureFilter> array = new List <PacketCaptureFilter>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(PacketCaptureFilter.DeserializePacketCaptureFilter(item)); } filters = array; continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new PacketCaptureData(name.Value, id.Value, etag.Value, target.Value, Optional.ToNullable(bytesToCapturePerPacket), Optional.ToNullable(totalBytesPerSession), Optional.ToNullable(timeLimitInSeconds), storageLocation.Value, Optional.ToList(filters), Optional.ToNullable(provisioningState))); }
///GENMHASH:887C2A0E5287839F96B28FB718A8E46C:CA53B7BE62B1D1854755EDD010D28892 internal PCFilterImpl(PacketCaptureFilter inner, PacketCaptureImpl parent) : base(inner) { this.parent = parent; }