Table of Contents

Class FormComponent

Namespace
Auth0.ManagementApi
Assembly
Auth0.ManagementApi.dll
[JsonConverter(typeof(FormComponent.JsonConverter))]
[Serializable]
public class FormComponent
Inheritance
FormComponent
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

AsFormBlock()

Returns the value as a FormBlock if Type is 'formBlock', otherwise throws an exception.

public FormBlock AsFormBlock()

Returns

FormBlock

Exceptions

ManagementException

Thrown when Type is not 'formBlock'.

AsFormField()

Returns the value as a FormField if Type is 'formField', otherwise throws an exception.

public FormField AsFormField()

Returns

FormField

Exceptions

ManagementException

Thrown when Type is not 'formField'.

AsFormWidget()

Returns the value as a FormWidget if Type is 'formWidget', otherwise throws an exception.

public FormWidget AsFormWidget()

Returns

FormWidget

Exceptions

ManagementException

Thrown when Type is not 'formWidget'.

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.

FromFormBlock(FormBlock)

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

public static FormComponent FromFormBlock(FormBlock value)

Parameters

value FormBlock

Returns

FormComponent

FromFormField(FormField)

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

public static FormComponent FromFormField(FormField value)

Parameters

value FormField

Returns

FormComponent

FromFormWidget(FormWidget)

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

public static FormComponent FromFormWidget(FormWidget value)

Parameters

value FormWidget

Returns

FormComponent

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsFormBlock()

Returns true if Type is "formBlock"

public bool IsFormBlock()

Returns

bool

IsFormField()

Returns true if Type is "formField"

public bool IsFormField()

Returns

bool

IsFormWidget()

Returns true if Type is "formWidget"

public bool IsFormWidget()

Returns

bool

Match<T>(Func<FormBlock, T>, Func<FormWidget, T>, Func<FormField, T>)

public T Match<T>(Func<FormBlock, T> onFormBlock, Func<FormWidget, T> onFormWidget, Func<FormField, T> onFormField)

Parameters

onFormBlock Func<FormBlock, T>
onFormWidget Func<FormWidget, T>
onFormField Func<FormField, 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.

TryGetFormBlock(out FormBlock?)

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

public bool TryGetFormBlock(out FormBlock? value)

Parameters

value FormBlock

Returns

bool

TryGetFormField(out FormField?)

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

public bool TryGetFormField(out FormField? value)

Parameters

value FormField

Returns

bool

TryGetFormWidget(out FormWidget?)

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

public bool TryGetFormWidget(out FormWidget? value)

Parameters

value FormWidget

Returns

bool

Visit(Action<FormBlock>, Action<FormWidget>, Action<FormField>)

public void Visit(Action<FormBlock> onFormBlock, Action<FormWidget> onFormWidget, Action<FormField> onFormField)

Parameters

onFormBlock Action<FormBlock>
onFormWidget Action<FormWidget>
onFormField Action<FormField>

Operators

implicit operator FormComponent(FormBlock)

public static implicit operator FormComponent(FormBlock value)

Parameters

value FormBlock

Returns

FormComponent

implicit operator FormComponent(FormBlockDivider)

public static implicit operator FormComponent(FormBlockDivider value)

Parameters

value FormBlockDivider

Returns

FormComponent

implicit operator FormComponent(FormBlockHtml)

public static implicit operator FormComponent(FormBlockHtml value)

Parameters

value FormBlockHtml

Returns

FormComponent

implicit operator FormComponent(FormBlockImage)

public static implicit operator FormComponent(FormBlockImage value)

Parameters

value FormBlockImage

Returns

FormComponent

implicit operator FormComponent(FormBlockJumpButton)

public static implicit operator FormComponent(FormBlockJumpButton value)

Parameters

value FormBlockJumpButton

Returns

FormComponent

implicit operator FormComponent(FormBlockNextButton)

public static implicit operator FormComponent(FormBlockNextButton value)

Parameters

value FormBlockNextButton

Returns

FormComponent

implicit operator FormComponent(FormBlockPreviousButton)

public static implicit operator FormComponent(FormBlockPreviousButton value)

Parameters

value FormBlockPreviousButton

Returns

FormComponent

implicit operator FormComponent(FormBlockResendButton)

public static implicit operator FormComponent(FormBlockResendButton value)

Parameters

value FormBlockResendButton

Returns

FormComponent

implicit operator FormComponent(FormBlockRichText)

public static implicit operator FormComponent(FormBlockRichText value)

Parameters

value FormBlockRichText

Returns

FormComponent

implicit operator FormComponent(FormField)

public static implicit operator FormComponent(FormField value)

Parameters

value FormField

Returns

FormComponent

implicit operator FormComponent(FormFieldBoolean)

public static implicit operator FormComponent(FormFieldBoolean value)

Parameters

value FormFieldBoolean

Returns

FormComponent

implicit operator FormComponent(FormFieldCards)

public static implicit operator FormComponent(FormFieldCards value)

Parameters

value FormFieldCards

Returns

FormComponent

implicit operator FormComponent(FormFieldChoice)

public static implicit operator FormComponent(FormFieldChoice value)

Parameters

value FormFieldChoice

Returns

FormComponent

implicit operator FormComponent(FormFieldCustom)

public static implicit operator FormComponent(FormFieldCustom value)

Parameters

value FormFieldCustom

Returns

FormComponent

implicit operator FormComponent(FormFieldDate)

public static implicit operator FormComponent(FormFieldDate value)

Parameters

value FormFieldDate

Returns

FormComponent

implicit operator FormComponent(FormFieldDropdown)

public static implicit operator FormComponent(FormFieldDropdown value)

Parameters

value FormFieldDropdown

Returns

FormComponent

implicit operator FormComponent(FormFieldEmail)

public static implicit operator FormComponent(FormFieldEmail value)

Parameters

value FormFieldEmail

Returns

FormComponent

implicit operator FormComponent(FormFieldFile)

public static implicit operator FormComponent(FormFieldFile value)

Parameters

value FormFieldFile

Returns

FormComponent

implicit operator FormComponent(FormFieldLegal)

public static implicit operator FormComponent(FormFieldLegal value)

Parameters

value FormFieldLegal

Returns

FormComponent

implicit operator FormComponent(FormFieldNumber)

public static implicit operator FormComponent(FormFieldNumber value)

Parameters

value FormFieldNumber

Returns

FormComponent

implicit operator FormComponent(FormFieldPassword)

public static implicit operator FormComponent(FormFieldPassword value)

Parameters

value FormFieldPassword

Returns

FormComponent

implicit operator FormComponent(FormFieldPayment)

public static implicit operator FormComponent(FormFieldPayment value)

Parameters

value FormFieldPayment

Returns

FormComponent

implicit operator FormComponent(FormFieldSocial)

public static implicit operator FormComponent(FormFieldSocial value)

Parameters

value FormFieldSocial

Returns

FormComponent

implicit operator FormComponent(FormFieldTel)

public static implicit operator FormComponent(FormFieldTel value)

Parameters

value FormFieldTel

Returns

FormComponent

implicit operator FormComponent(FormFieldText)

public static implicit operator FormComponent(FormFieldText value)

Parameters

value FormFieldText

Returns

FormComponent

implicit operator FormComponent(FormFieldUrl)

public static implicit operator FormComponent(FormFieldUrl value)

Parameters

value FormFieldUrl

Returns

FormComponent

implicit operator FormComponent(FormWidget)

public static implicit operator FormComponent(FormWidget value)

Parameters

value FormWidget

Returns

FormComponent

implicit operator FormComponent(FormWidgetAuth0VerifiableCredentials)

public static implicit operator FormComponent(FormWidgetAuth0VerifiableCredentials value)

Parameters

value FormWidgetAuth0VerifiableCredentials

Returns

FormComponent

implicit operator FormComponent(FormWidgetGMapsAddress)

public static implicit operator FormComponent(FormWidgetGMapsAddress value)

Parameters

value FormWidgetGMapsAddress

Returns

FormComponent

implicit operator FormComponent(FormWidgetRecaptcha)

public static implicit operator FormComponent(FormWidgetRecaptcha value)

Parameters

value FormWidgetRecaptcha

Returns

FormComponent