public SslProtocolMatchConditionParameters(SslProtocolMatchConditionParametersTypeName typeName, SslProtocolOperator @operator) { TypeName = typeName; Operator = @operator; MatchValues = new ChangeTrackingList <SslProtocol>(); Transforms = new ChangeTrackingList <TransformCategory>(); }
public SslProtocolMatchConditionDefinition(SslProtocolMatchConditionType typeDefinition, SslProtocolOperator @operator) { TypeDefinition = typeDefinition; Operator = @operator; MatchValues = new ChangeTrackingList <SslProtocol>(); Transforms = new ChangeTrackingList <PreTransformCategory>(); }
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("typeName"); writer.WriteStringValue(ConditionType.ToString()); writer.WritePropertyName("operator"); writer.WriteStringValue(SslProtocolOperator.ToString()); if (Optional.IsDefined(NegateCondition)) { writer.WritePropertyName("negateCondition"); writer.WriteBooleanValue(NegateCondition.Value); } if (Optional.IsCollectionDefined(MatchValues)) { writer.WritePropertyName("matchValues"); writer.WriteStartArray(); foreach (var item in MatchValues) { writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); } if (Optional.IsCollectionDefined(Transforms)) { writer.WritePropertyName("transforms"); writer.WriteStartArray(); foreach (var item in Transforms) { writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); } writer.WriteEndObject(); }
public SslProtocolMatchCondition(SslProtocolMatchConditionType conditionType, SslProtocolOperator sslProtocolOperator) { ConditionType = conditionType; SslProtocolOperator = sslProtocolOperator; MatchValues = new ChangeTrackingList <SslProtocol>(); Transforms = new ChangeTrackingList <PreTransformCategory>(); }
internal SslProtocolMatchConditionDefinition(SslProtocolMatchConditionType typeDefinition, SslProtocolOperator @operator, bool?negateCondition, IList <SslProtocol> matchValues, IList <PreTransformCategory> transforms) { TypeDefinition = typeDefinition; Operator = @operator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; }
internal SslProtocolMatchConditionParameters(SslProtocolMatchConditionParametersTypeName typeName, SslProtocolOperator @operator, bool?negateCondition, IList <SslProtocol> matchValues, IList <TransformCategory> transforms) { TypeName = typeName; Operator = @operator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; }
internal SslProtocolMatchCondition(SslProtocolMatchConditionType conditionType, SslProtocolOperator sslProtocolOperator, bool?negateCondition, IList <SslProtocol> matchValues, IList <PreTransformCategory> transforms) { ConditionType = conditionType; SslProtocolOperator = sslProtocolOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; }
internal static SslProtocolMatchConditionDefinition DeserializeSslProtocolMatchConditionDefinition(JsonElement element) { SslProtocolMatchConditionType typeName = default; SslProtocolOperator @operator = default; Optional <bool> negateCondition = default; Optional <IList <SslProtocol> > matchValues = default; Optional <IList <PreTransformCategory> > transforms = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("typeName")) { typeName = new SslProtocolMatchConditionType(property.Value.GetString()); continue; } if (property.NameEquals("operator")) { @operator = new SslProtocolOperator(property.Value.GetString()); continue; } if (property.NameEquals("negateCondition")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } negateCondition = property.Value.GetBoolean(); continue; } if (property.NameEquals("matchValues")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <SslProtocol> array = new List <SslProtocol>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(new SslProtocol(item.GetString())); } matchValues = array; continue; } if (property.NameEquals("transforms")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <PreTransformCategory> array = new List <PreTransformCategory>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(new PreTransformCategory(item.GetString())); } transforms = array; continue; } } return(new SslProtocolMatchConditionDefinition(typeName, @operator, Optional.ToNullable(negateCondition), Optional.ToList(matchValues), Optional.ToList(transforms))); }