Class FormBlock
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
[JsonConverter(typeof(FormBlock.JsonConverter))]
[Serializable]
public class FormBlock
- Inheritance
-
FormBlock
- 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
AsFormBlockDivider()
Returns the value as a FormBlockDivider if Type is 'formBlockDivider', otherwise throws an exception.
public FormBlockDivider AsFormBlockDivider()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlockDivider'.
AsFormBlockHtml()
Returns the value as a FormBlockHtml if Type is 'formBlockHtml', otherwise throws an exception.
public FormBlockHtml AsFormBlockHtml()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlockHtml'.
AsFormBlockImage()
Returns the value as a FormBlockImage if Type is 'formBlockImage', otherwise throws an exception.
public FormBlockImage AsFormBlockImage()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlockImage'.
AsFormBlockJumpButton()
Returns the value as a FormBlockJumpButton if Type is 'formBlockJumpButton', otherwise throws an exception.
public FormBlockJumpButton AsFormBlockJumpButton()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlockJumpButton'.
AsFormBlockNextButton()
Returns the value as a FormBlockNextButton if Type is 'formBlockNextButton', otherwise throws an exception.
public FormBlockNextButton AsFormBlockNextButton()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlockNextButton'.
AsFormBlockPreviousButton()
Returns the value as a FormBlockPreviousButton if Type is 'formBlockPreviousButton', otherwise throws an exception.
public FormBlockPreviousButton AsFormBlockPreviousButton()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlockPreviousButton'.
AsFormBlockResendButton()
Returns the value as a FormBlockResendButton if Type is 'formBlockResendButton', otherwise throws an exception.
public FormBlockResendButton AsFormBlockResendButton()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlockResendButton'.
AsFormBlockRichText()
Returns the value as a FormBlockRichText if Type is 'formBlockRichText', otherwise throws an exception.
public FormBlockRichText AsFormBlockRichText()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formBlockRichText'.
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.
FromFormBlockDivider(FormBlockDivider)
Factory method to create a union from a Auth0.ManagementApi.FormBlockDivider value.
public static FormBlock FromFormBlockDivider(FormBlockDivider value)
Parameters
valueFormBlockDivider
Returns
FromFormBlockHtml(FormBlockHtml)
Factory method to create a union from a Auth0.ManagementApi.FormBlockHtml value.
public static FormBlock FromFormBlockHtml(FormBlockHtml value)
Parameters
valueFormBlockHtml
Returns
FromFormBlockImage(FormBlockImage)
Factory method to create a union from a Auth0.ManagementApi.FormBlockImage value.
public static FormBlock FromFormBlockImage(FormBlockImage value)
Parameters
valueFormBlockImage
Returns
FromFormBlockJumpButton(FormBlockJumpButton)
Factory method to create a union from a Auth0.ManagementApi.FormBlockJumpButton value.
public static FormBlock FromFormBlockJumpButton(FormBlockJumpButton value)
Parameters
valueFormBlockJumpButton
Returns
FromFormBlockNextButton(FormBlockNextButton)
Factory method to create a union from a Auth0.ManagementApi.FormBlockNextButton value.
public static FormBlock FromFormBlockNextButton(FormBlockNextButton value)
Parameters
valueFormBlockNextButton
Returns
FromFormBlockPreviousButton(FormBlockPreviousButton)
Factory method to create a union from a Auth0.ManagementApi.FormBlockPreviousButton value.
public static FormBlock FromFormBlockPreviousButton(FormBlockPreviousButton value)
Parameters
valueFormBlockPreviousButton
Returns
FromFormBlockResendButton(FormBlockResendButton)
Factory method to create a union from a Auth0.ManagementApi.FormBlockResendButton value.
public static FormBlock FromFormBlockResendButton(FormBlockResendButton value)
Parameters
valueFormBlockResendButton
Returns
FromFormBlockRichText(FormBlockRichText)
Factory method to create a union from a Auth0.ManagementApi.FormBlockRichText value.
public static FormBlock FromFormBlockRichText(FormBlockRichText value)
Parameters
valueFormBlockRichText
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
IsFormBlockDivider()
Returns true if Type is "formBlockDivider"
public bool IsFormBlockDivider()
Returns
IsFormBlockHtml()
Returns true if Type is "formBlockHtml"
public bool IsFormBlockHtml()
Returns
IsFormBlockImage()
Returns true if Type is "formBlockImage"
public bool IsFormBlockImage()
Returns
IsFormBlockJumpButton()
Returns true if Type is "formBlockJumpButton"
public bool IsFormBlockJumpButton()
Returns
IsFormBlockNextButton()
Returns true if Type is "formBlockNextButton"
public bool IsFormBlockNextButton()
Returns
IsFormBlockPreviousButton()
Returns true if Type is "formBlockPreviousButton"
public bool IsFormBlockPreviousButton()
Returns
IsFormBlockResendButton()
Returns true if Type is "formBlockResendButton"
public bool IsFormBlockResendButton()
Returns
IsFormBlockRichText()
Returns true if Type is "formBlockRichText"
public bool IsFormBlockRichText()
Returns
Match<T>(Func<FormBlockDivider, T>, Func<FormBlockHtml, T>, Func<FormBlockImage, T>, Func<FormBlockJumpButton, T>, Func<FormBlockResendButton, T>, Func<FormBlockNextButton, T>, Func<FormBlockPreviousButton, T>, Func<FormBlockRichText, T>)
public T Match<T>(Func<FormBlockDivider, T> onFormBlockDivider, Func<FormBlockHtml, T> onFormBlockHtml, Func<FormBlockImage, T> onFormBlockImage, Func<FormBlockJumpButton, T> onFormBlockJumpButton, Func<FormBlockResendButton, T> onFormBlockResendButton, Func<FormBlockNextButton, T> onFormBlockNextButton, Func<FormBlockPreviousButton, T> onFormBlockPreviousButton, Func<FormBlockRichText, T> onFormBlockRichText)
Parameters
onFormBlockDividerFunc<FormBlockDivider, T>onFormBlockHtmlFunc<FormBlockHtml, T>onFormBlockImageFunc<FormBlockImage, T>onFormBlockJumpButtonFunc<FormBlockJumpButton, T>onFormBlockResendButtonFunc<FormBlockResendButton, T>onFormBlockNextButtonFunc<FormBlockNextButton, T>onFormBlockPreviousButtonFunc<FormBlockPreviousButton, T>onFormBlockRichTextFunc<FormBlockRichText, 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.
TryGetFormBlockDivider(out FormBlockDivider?)
Attempts to cast the value to a FormBlockDivider and returns true if successful.
public bool TryGetFormBlockDivider(out FormBlockDivider? value)
Parameters
valueFormBlockDivider
Returns
TryGetFormBlockHtml(out FormBlockHtml?)
Attempts to cast the value to a FormBlockHtml and returns true if successful.
public bool TryGetFormBlockHtml(out FormBlockHtml? value)
Parameters
valueFormBlockHtml
Returns
TryGetFormBlockImage(out FormBlockImage?)
Attempts to cast the value to a FormBlockImage and returns true if successful.
public bool TryGetFormBlockImage(out FormBlockImage? value)
Parameters
valueFormBlockImage
Returns
TryGetFormBlockJumpButton(out FormBlockJumpButton?)
Attempts to cast the value to a FormBlockJumpButton and returns true if successful.
public bool TryGetFormBlockJumpButton(out FormBlockJumpButton? value)
Parameters
valueFormBlockJumpButton
Returns
TryGetFormBlockNextButton(out FormBlockNextButton?)
Attempts to cast the value to a FormBlockNextButton and returns true if successful.
public bool TryGetFormBlockNextButton(out FormBlockNextButton? value)
Parameters
valueFormBlockNextButton
Returns
TryGetFormBlockPreviousButton(out FormBlockPreviousButton?)
Attempts to cast the value to a FormBlockPreviousButton and returns true if successful.
public bool TryGetFormBlockPreviousButton(out FormBlockPreviousButton? value)
Parameters
valueFormBlockPreviousButton
Returns
TryGetFormBlockResendButton(out FormBlockResendButton?)
Attempts to cast the value to a FormBlockResendButton and returns true if successful.
public bool TryGetFormBlockResendButton(out FormBlockResendButton? value)
Parameters
valueFormBlockResendButton
Returns
TryGetFormBlockRichText(out FormBlockRichText?)
Attempts to cast the value to a FormBlockRichText and returns true if successful.
public bool TryGetFormBlockRichText(out FormBlockRichText? value)
Parameters
valueFormBlockRichText
Returns
Visit(Action<FormBlockDivider>, Action<FormBlockHtml>, Action<FormBlockImage>, Action<FormBlockJumpButton>, Action<FormBlockResendButton>, Action<FormBlockNextButton>, Action<FormBlockPreviousButton>, Action<FormBlockRichText>)
public void Visit(Action<FormBlockDivider> onFormBlockDivider, Action<FormBlockHtml> onFormBlockHtml, Action<FormBlockImage> onFormBlockImage, Action<FormBlockJumpButton> onFormBlockJumpButton, Action<FormBlockResendButton> onFormBlockResendButton, Action<FormBlockNextButton> onFormBlockNextButton, Action<FormBlockPreviousButton> onFormBlockPreviousButton, Action<FormBlockRichText> onFormBlockRichText)
Parameters
onFormBlockDividerAction<FormBlockDivider>onFormBlockHtmlAction<FormBlockHtml>onFormBlockImageAction<FormBlockImage>onFormBlockJumpButtonAction<FormBlockJumpButton>onFormBlockResendButtonAction<FormBlockResendButton>onFormBlockNextButtonAction<FormBlockNextButton>onFormBlockPreviousButtonAction<FormBlockPreviousButton>onFormBlockRichTextAction<FormBlockRichText>
Operators
implicit operator FormBlock(FormBlockDivider)
public static implicit operator FormBlock(FormBlockDivider value)
Parameters
valueFormBlockDivider
Returns
implicit operator FormBlock(FormBlockHtml)
public static implicit operator FormBlock(FormBlockHtml value)
Parameters
valueFormBlockHtml
Returns
implicit operator FormBlock(FormBlockImage)
public static implicit operator FormBlock(FormBlockImage value)
Parameters
valueFormBlockImage
Returns
implicit operator FormBlock(FormBlockJumpButton)
public static implicit operator FormBlock(FormBlockJumpButton value)
Parameters
valueFormBlockJumpButton
Returns
implicit operator FormBlock(FormBlockNextButton)
public static implicit operator FormBlock(FormBlockNextButton value)
Parameters
valueFormBlockNextButton
Returns
implicit operator FormBlock(FormBlockPreviousButton)
public static implicit operator FormBlock(FormBlockPreviousButton value)
Parameters
valueFormBlockPreviousButton
Returns
implicit operator FormBlock(FormBlockResendButton)
public static implicit operator FormBlock(FormBlockResendButton value)
Parameters
valueFormBlockResendButton
Returns
implicit operator FormBlock(FormBlockRichText)
public static implicit operator FormBlock(FormBlockRichText value)
Parameters
valueFormBlockRichText