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
Value
Union value
[JsonIgnore]
public object? Value { get; }
Property Value
Methods
AsFormBlock()
public FormBlock AsFormBlock()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlock'.
AsFormField()
public FormField AsFormField()
Returns
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
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
objobjectThe 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
valueFormBlock
Returns
FromFormField(FormField)
Factory method to create a union from a Auth0.ManagementApi.FormField value.
public static FormComponent FromFormField(FormField value)
Parameters
valueFormField
Returns
FromFormWidget(FormWidget)
Factory method to create a union from a Auth0.ManagementApi.FormWidget value.
public static FormComponent FromFormWidget(FormWidget value)
Parameters
valueFormWidget
Returns
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
IsFormField()
Returns true if Type is "formField"
public bool IsFormField()
Returns
IsFormWidget()
Returns true if Type is "formWidget"
public bool IsFormWidget()
Returns
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
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
valueFormBlock
Returns
TryGetFormField(out FormField?)
Attempts to cast the value to a FormField and returns true if successful.
public bool TryGetFormField(out FormField? value)
Parameters
valueFormField
Returns
TryGetFormWidget(out FormWidget?)
Attempts to cast the value to a FormWidget and returns true if successful.
public bool TryGetFormWidget(out FormWidget? value)
Parameters
valueFormWidget
Returns
Visit(Action<FormBlock>, Action<FormWidget>, Action<FormField>)
public void Visit(Action<FormBlock> onFormBlock, Action<FormWidget> onFormWidget, Action<FormField> onFormField)
Parameters
Operators
implicit operator FormComponent(FormBlock)
public static implicit operator FormComponent(FormBlock value)
Parameters
valueFormBlock
Returns
implicit operator FormComponent(FormBlockDivider)
public static implicit operator FormComponent(FormBlockDivider value)
Parameters
valueFormBlockDivider
Returns
implicit operator FormComponent(FormBlockHtml)
public static implicit operator FormComponent(FormBlockHtml value)
Parameters
valueFormBlockHtml
Returns
implicit operator FormComponent(FormBlockImage)
public static implicit operator FormComponent(FormBlockImage value)
Parameters
valueFormBlockImage
Returns
implicit operator FormComponent(FormBlockJumpButton)
public static implicit operator FormComponent(FormBlockJumpButton value)
Parameters
valueFormBlockJumpButton
Returns
implicit operator FormComponent(FormBlockNextButton)
public static implicit operator FormComponent(FormBlockNextButton value)
Parameters
valueFormBlockNextButton
Returns
implicit operator FormComponent(FormBlockPreviousButton)
public static implicit operator FormComponent(FormBlockPreviousButton value)
Parameters
valueFormBlockPreviousButton
Returns
implicit operator FormComponent(FormBlockResendButton)
public static implicit operator FormComponent(FormBlockResendButton value)
Parameters
valueFormBlockResendButton
Returns
implicit operator FormComponent(FormBlockRichText)
public static implicit operator FormComponent(FormBlockRichText value)
Parameters
valueFormBlockRichText
Returns
implicit operator FormComponent(FormField)
public static implicit operator FormComponent(FormField value)
Parameters
valueFormField
Returns
implicit operator FormComponent(FormFieldBoolean)
public static implicit operator FormComponent(FormFieldBoolean value)
Parameters
valueFormFieldBoolean
Returns
implicit operator FormComponent(FormFieldCards)
public static implicit operator FormComponent(FormFieldCards value)
Parameters
valueFormFieldCards
Returns
implicit operator FormComponent(FormFieldChoice)
public static implicit operator FormComponent(FormFieldChoice value)
Parameters
valueFormFieldChoice
Returns
implicit operator FormComponent(FormFieldCustom)
public static implicit operator FormComponent(FormFieldCustom value)
Parameters
valueFormFieldCustom
Returns
implicit operator FormComponent(FormFieldDate)
public static implicit operator FormComponent(FormFieldDate value)
Parameters
valueFormFieldDate
Returns
implicit operator FormComponent(FormFieldDropdown)
public static implicit operator FormComponent(FormFieldDropdown value)
Parameters
valueFormFieldDropdown
Returns
implicit operator FormComponent(FormFieldEmail)
public static implicit operator FormComponent(FormFieldEmail value)
Parameters
valueFormFieldEmail
Returns
implicit operator FormComponent(FormFieldFile)
public static implicit operator FormComponent(FormFieldFile value)
Parameters
valueFormFieldFile
Returns
implicit operator FormComponent(FormFieldLegal)
public static implicit operator FormComponent(FormFieldLegal value)
Parameters
valueFormFieldLegal
Returns
implicit operator FormComponent(FormFieldNumber)
public static implicit operator FormComponent(FormFieldNumber value)
Parameters
valueFormFieldNumber
Returns
implicit operator FormComponent(FormFieldPassword)
public static implicit operator FormComponent(FormFieldPassword value)
Parameters
valueFormFieldPassword
Returns
implicit operator FormComponent(FormFieldPayment)
public static implicit operator FormComponent(FormFieldPayment value)
Parameters
valueFormFieldPayment
Returns
implicit operator FormComponent(FormFieldSocial)
public static implicit operator FormComponent(FormFieldSocial value)
Parameters
valueFormFieldSocial
Returns
implicit operator FormComponent(FormFieldTel)
public static implicit operator FormComponent(FormFieldTel value)
Parameters
valueFormFieldTel
Returns
implicit operator FormComponent(FormFieldText)
public static implicit operator FormComponent(FormFieldText value)
Parameters
valueFormFieldText
Returns
implicit operator FormComponent(FormFieldUrl)
public static implicit operator FormComponent(FormFieldUrl value)
Parameters
valueFormFieldUrl
Returns
implicit operator FormComponent(FormWidget)
public static implicit operator FormComponent(FormWidget value)
Parameters
valueFormWidget
Returns
implicit operator FormComponent(FormWidgetAuth0VerifiableCredentials)
public static implicit operator FormComponent(FormWidgetAuth0VerifiableCredentials value)
Parameters
Returns
implicit operator FormComponent(FormWidgetGMapsAddress)
public static implicit operator FormComponent(FormWidgetGMapsAddress value)
Parameters
valueFormWidgetGMapsAddress
Returns
implicit operator FormComponent(FormWidgetRecaptcha)
public static implicit operator FormComponent(FormWidgetRecaptcha value)
Parameters
valueFormWidgetRecaptcha