Class SegmentMatchExpression
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
[JsonConverter(typeof(SegmentMatchExpression.JsonConverter))]
[Serializable]
public class SegmentMatchExpression
- Inheritance
-
SegmentMatchExpression
- Inherited Members
- Extension Methods
Properties
Type
Type discriminator
[JsonIgnore]
public string Type { get; }
Property Value
Value
Union value
[JsonIgnore]
public object? Value { get; }
Property Value
Methods
AsListOfString()
public IEnumerable<string> AsListOfString()
Returns
AsSegmentContainsExpression()
Returns the value as a SegmentContainsExpression if Type is 'segmentContainsExpression', otherwise throws an exception.
public SegmentContainsExpression AsSegmentContainsExpression()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'segmentContainsExpression'.
AsSegmentEndsWithExpression()
Returns the value as a SegmentEndsWithExpression if Type is 'segmentEndsWithExpression', otherwise throws an exception.
public SegmentEndsWithExpression AsSegmentEndsWithExpression()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'segmentEndsWithExpression'.
AsSegmentExistsExpression()
Returns the value as a SegmentExistsExpression if Type is 'segmentExistsExpression', otherwise throws an exception.
public SegmentExistsExpression AsSegmentExistsExpression()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'segmentExistsExpression'.
AsSegmentStartsWithExpression()
Returns the value as a SegmentStartsWithExpression if Type is 'segmentStartsWithExpression', otherwise throws an exception.
public SegmentStartsWithExpression AsSegmentStartsWithExpression()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'segmentStartsWithExpression'.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
- bool
true if the specified object is equal to the current object; otherwise, false.
FromListOfString(IEnumerable<string>)
public static SegmentMatchExpression FromListOfString(IEnumerable<string> value)
Parameters
valueIEnumerable<string>
Returns
FromSegmentContainsExpression(SegmentContainsExpression)
Factory method to create a union from a Auth0.ManagementApi.SegmentContainsExpression value.
public static SegmentMatchExpression FromSegmentContainsExpression(SegmentContainsExpression value)
Parameters
Returns
FromSegmentEndsWithExpression(SegmentEndsWithExpression)
Factory method to create a union from a Auth0.ManagementApi.SegmentEndsWithExpression value.
public static SegmentMatchExpression FromSegmentEndsWithExpression(SegmentEndsWithExpression value)
Parameters
Returns
FromSegmentExistsExpression(SegmentExistsExpression)
Factory method to create a union from a Auth0.ManagementApi.SegmentExistsExpression value.
public static SegmentMatchExpression FromSegmentExistsExpression(SegmentExistsExpression value)
Parameters
valueSegmentExistsExpression
Returns
FromSegmentStartsWithExpression(SegmentStartsWithExpression)
Factory method to create a union from a Auth0.ManagementApi.SegmentStartsWithExpression value.
public static SegmentMatchExpression FromSegmentStartsWithExpression(SegmentStartsWithExpression value)
Parameters
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
IsListOfString()
Returns true if Type is "list"
public bool IsListOfString()
Returns
IsSegmentContainsExpression()
Returns true if Type is "segmentContainsExpression"
public bool IsSegmentContainsExpression()
Returns
IsSegmentEndsWithExpression()
Returns true if Type is "segmentEndsWithExpression"
public bool IsSegmentEndsWithExpression()
Returns
IsSegmentExistsExpression()
Returns true if Type is "segmentExistsExpression"
public bool IsSegmentExistsExpression()
Returns
IsSegmentStartsWithExpression()
Returns true if Type is "segmentStartsWithExpression"
public bool IsSegmentStartsWithExpression()
Returns
Match<T>(Func<IEnumerable<string>, T>, Func<SegmentContainsExpression, T>, Func<SegmentStartsWithExpression, T>, Func<SegmentEndsWithExpression, T>, Func<SegmentExistsExpression, T>)
public T Match<T>(Func<IEnumerable<string>, T> onListOfString, Func<SegmentContainsExpression, T> onSegmentContainsExpression, Func<SegmentStartsWithExpression, T> onSegmentStartsWithExpression, Func<SegmentEndsWithExpression, T> onSegmentEndsWithExpression, Func<SegmentExistsExpression, T> onSegmentExistsExpression)
Parameters
onListOfStringFunc<IEnumerable<string>, T>onSegmentContainsExpressionFunc<SegmentContainsExpression, T>onSegmentStartsWithExpressionFunc<SegmentStartsWithExpression, T>onSegmentEndsWithExpressionFunc<SegmentEndsWithExpression, T>onSegmentExistsExpressionFunc<SegmentExistsExpression, T>
Returns
- T
Type Parameters
T
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
TryGetListOfString(out IEnumerable<string>?)
public bool TryGetListOfString(out IEnumerable<string>? value)
Parameters
valueIEnumerable<string>
Returns
TryGetSegmentContainsExpression(out SegmentContainsExpression?)
Attempts to cast the value to a SegmentContainsExpression and returns true if successful.
public bool TryGetSegmentContainsExpression(out SegmentContainsExpression? value)
Parameters
Returns
TryGetSegmentEndsWithExpression(out SegmentEndsWithExpression?)
Attempts to cast the value to a SegmentEndsWithExpression and returns true if successful.
public bool TryGetSegmentEndsWithExpression(out SegmentEndsWithExpression? value)
Parameters
Returns
TryGetSegmentExistsExpression(out SegmentExistsExpression?)
Attempts to cast the value to a SegmentExistsExpression and returns true if successful.
public bool TryGetSegmentExistsExpression(out SegmentExistsExpression? value)
Parameters
valueSegmentExistsExpression
Returns
TryGetSegmentStartsWithExpression(out SegmentStartsWithExpression?)
Attempts to cast the value to a SegmentStartsWithExpression and returns true if successful.
public bool TryGetSegmentStartsWithExpression(out SegmentStartsWithExpression? value)
Parameters
Returns
Visit(Action<IEnumerable<string>>, Action<SegmentContainsExpression>, Action<SegmentStartsWithExpression>, Action<SegmentEndsWithExpression>, Action<SegmentExistsExpression>)
public void Visit(Action<IEnumerable<string>> onListOfString, Action<SegmentContainsExpression> onSegmentContainsExpression, Action<SegmentStartsWithExpression> onSegmentStartsWithExpression, Action<SegmentEndsWithExpression> onSegmentEndsWithExpression, Action<SegmentExistsExpression> onSegmentExistsExpression)
Parameters
onListOfStringAction<IEnumerable<string>>onSegmentContainsExpressionAction<SegmentContainsExpression>onSegmentStartsWithExpressionAction<SegmentStartsWithExpression>onSegmentEndsWithExpressionAction<SegmentEndsWithExpression>onSegmentExistsExpressionAction<SegmentExistsExpression>
Operators
implicit operator SegmentMatchExpression(SegmentContainsExpression)
public static implicit operator SegmentMatchExpression(SegmentContainsExpression value)
Parameters
Returns
implicit operator SegmentMatchExpression(SegmentEndsWithExpression)
public static implicit operator SegmentMatchExpression(SegmentEndsWithExpression value)
Parameters
Returns
implicit operator SegmentMatchExpression(SegmentExistsExpression)
public static implicit operator SegmentMatchExpression(SegmentExistsExpression value)
Parameters
valueSegmentExistsExpression
Returns
implicit operator SegmentMatchExpression(SegmentStartsWithExpression)
public static implicit operator SegmentMatchExpression(SegmentStartsWithExpression value)