Table of Contents

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

string

Value

Union value

[JsonIgnore]
public object? Value { get; }

Property Value

object

Methods

AsListOfString()

public IEnumerable<string> AsListOfString()

Returns

IEnumerable<string>

AsSegmentContainsExpression()

Returns the value as a SegmentContainsExpression if Type is 'segmentContainsExpression', otherwise throws an exception.

public SegmentContainsExpression AsSegmentContainsExpression()

Returns

SegmentContainsExpression

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

SegmentEndsWithExpression

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

SegmentExistsExpression

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

SegmentStartsWithExpression

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

obj object

The 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

value IEnumerable<string>

Returns

SegmentMatchExpression

FromSegmentContainsExpression(SegmentContainsExpression)

Factory method to create a union from a Auth0.ManagementApi.SegmentContainsExpression value.

public static SegmentMatchExpression FromSegmentContainsExpression(SegmentContainsExpression value)

Parameters

value SegmentContainsExpression

Returns

SegmentMatchExpression

FromSegmentEndsWithExpression(SegmentEndsWithExpression)

Factory method to create a union from a Auth0.ManagementApi.SegmentEndsWithExpression value.

public static SegmentMatchExpression FromSegmentEndsWithExpression(SegmentEndsWithExpression value)

Parameters

value SegmentEndsWithExpression

Returns

SegmentMatchExpression

FromSegmentExistsExpression(SegmentExistsExpression)

Factory method to create a union from a Auth0.ManagementApi.SegmentExistsExpression value.

public static SegmentMatchExpression FromSegmentExistsExpression(SegmentExistsExpression value)

Parameters

value SegmentExistsExpression

Returns

SegmentMatchExpression

FromSegmentStartsWithExpression(SegmentStartsWithExpression)

Factory method to create a union from a Auth0.ManagementApi.SegmentStartsWithExpression value.

public static SegmentMatchExpression FromSegmentStartsWithExpression(SegmentStartsWithExpression value)

Parameters

value SegmentStartsWithExpression

Returns

SegmentMatchExpression

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

bool

IsSegmentContainsExpression()

Returns true if Type is "segmentContainsExpression"

public bool IsSegmentContainsExpression()

Returns

bool

IsSegmentEndsWithExpression()

Returns true if Type is "segmentEndsWithExpression"

public bool IsSegmentEndsWithExpression()

Returns

bool

IsSegmentExistsExpression()

Returns true if Type is "segmentExistsExpression"

public bool IsSegmentExistsExpression()

Returns

bool

IsSegmentStartsWithExpression()

Returns true if Type is "segmentStartsWithExpression"

public bool IsSegmentStartsWithExpression()

Returns

bool

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

onListOfString Func<IEnumerable<string>, T>
onSegmentContainsExpression Func<SegmentContainsExpression, T>
onSegmentStartsWithExpression Func<SegmentStartsWithExpression, T>
onSegmentEndsWithExpression Func<SegmentEndsWithExpression, T>
onSegmentExistsExpression Func<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

value IEnumerable<string>

Returns

bool

TryGetSegmentContainsExpression(out SegmentContainsExpression?)

Attempts to cast the value to a SegmentContainsExpression and returns true if successful.

public bool TryGetSegmentContainsExpression(out SegmentContainsExpression? value)

Parameters

value SegmentContainsExpression

Returns

bool

TryGetSegmentEndsWithExpression(out SegmentEndsWithExpression?)

Attempts to cast the value to a SegmentEndsWithExpression and returns true if successful.

public bool TryGetSegmentEndsWithExpression(out SegmentEndsWithExpression? value)

Parameters

value SegmentEndsWithExpression

Returns

bool

TryGetSegmentExistsExpression(out SegmentExistsExpression?)

Attempts to cast the value to a SegmentExistsExpression and returns true if successful.

public bool TryGetSegmentExistsExpression(out SegmentExistsExpression? value)

Parameters

value SegmentExistsExpression

Returns

bool

TryGetSegmentStartsWithExpression(out SegmentStartsWithExpression?)

Attempts to cast the value to a SegmentStartsWithExpression and returns true if successful.

public bool TryGetSegmentStartsWithExpression(out SegmentStartsWithExpression? value)

Parameters

value SegmentStartsWithExpression

Returns

bool

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

onListOfString Action<IEnumerable<string>>
onSegmentContainsExpression Action<SegmentContainsExpression>
onSegmentStartsWithExpression Action<SegmentStartsWithExpression>
onSegmentEndsWithExpression Action<SegmentEndsWithExpression>
onSegmentExistsExpression Action<SegmentExistsExpression>

Operators

implicit operator SegmentMatchExpression(SegmentContainsExpression)

public static implicit operator SegmentMatchExpression(SegmentContainsExpression value)

Parameters

value SegmentContainsExpression

Returns

SegmentMatchExpression

implicit operator SegmentMatchExpression(SegmentEndsWithExpression)

public static implicit operator SegmentMatchExpression(SegmentEndsWithExpression value)

Parameters

value SegmentEndsWithExpression

Returns

SegmentMatchExpression

implicit operator SegmentMatchExpression(SegmentExistsExpression)

public static implicit operator SegmentMatchExpression(SegmentExistsExpression value)

Parameters

value SegmentExistsExpression

Returns

SegmentMatchExpression

implicit operator SegmentMatchExpression(SegmentStartsWithExpression)

public static implicit operator SegmentMatchExpression(SegmentStartsWithExpression value)

Parameters

value SegmentStartsWithExpression

Returns

SegmentMatchExpression