Class FormField
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
[JsonConverter(typeof(FormField.JsonConverter))]
[Serializable]
public class FormField
- Inheritance
-
FormField
- 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
AsFormFieldBoolean()
Returns the value as a FormFieldBoolean if Type is 'formFieldBoolean', otherwise throws an exception.
public FormFieldBoolean AsFormFieldBoolean()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldBoolean'.
AsFormFieldCards()
Returns the value as a FormFieldCards if Type is 'formFieldCards', otherwise throws an exception.
public FormFieldCards AsFormFieldCards()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldCards'.
AsFormFieldChoice()
Returns the value as a FormFieldChoice if Type is 'formFieldChoice', otherwise throws an exception.
public FormFieldChoice AsFormFieldChoice()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldChoice'.
AsFormFieldCustom()
Returns the value as a FormFieldCustom if Type is 'formFieldCustom', otherwise throws an exception.
public FormFieldCustom AsFormFieldCustom()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldCustom'.
AsFormFieldDate()
Returns the value as a FormFieldDate if Type is 'formFieldDate', otherwise throws an exception.
public FormFieldDate AsFormFieldDate()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldDate'.
AsFormFieldDropdown()
Returns the value as a FormFieldDropdown if Type is 'formFieldDropdown', otherwise throws an exception.
public FormFieldDropdown AsFormFieldDropdown()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldDropdown'.
AsFormFieldEmail()
Returns the value as a FormFieldEmail if Type is 'formFieldEmail', otherwise throws an exception.
public FormFieldEmail AsFormFieldEmail()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldEmail'.
AsFormFieldFile()
Returns the value as a FormFieldFile if Type is 'formFieldFile', otherwise throws an exception.
public FormFieldFile AsFormFieldFile()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldFile'.
AsFormFieldLegal()
Returns the value as a FormFieldLegal if Type is 'formFieldLegal', otherwise throws an exception.
public FormFieldLegal AsFormFieldLegal()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldLegal'.
AsFormFieldNumber()
Returns the value as a FormFieldNumber if Type is 'formFieldNumber', otherwise throws an exception.
public FormFieldNumber AsFormFieldNumber()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldNumber'.
AsFormFieldPassword()
Returns the value as a FormFieldPassword if Type is 'formFieldPassword', otherwise throws an exception.
public FormFieldPassword AsFormFieldPassword()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldPassword'.
AsFormFieldPayment()
Returns the value as a FormFieldPayment if Type is 'formFieldPayment', otherwise throws an exception.
public FormFieldPayment AsFormFieldPayment()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldPayment'.
AsFormFieldSocial()
Returns the value as a FormFieldSocial if Type is 'formFieldSocial', otherwise throws an exception.
public FormFieldSocial AsFormFieldSocial()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldSocial'.
AsFormFieldTel()
Returns the value as a FormFieldTel if Type is 'formFieldTel', otherwise throws an exception.
public FormFieldTel AsFormFieldTel()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldTel'.
AsFormFieldText()
Returns the value as a FormFieldText if Type is 'formFieldText', otherwise throws an exception.
public FormFieldText AsFormFieldText()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldText'.
AsFormFieldUrl()
Returns the value as a FormFieldUrl if Type is 'formFieldUrl', otherwise throws an exception.
public FormFieldUrl AsFormFieldUrl()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'formFieldUrl'.
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.
FromFormFieldBoolean(FormFieldBoolean)
Factory method to create a union from a Auth0.ManagementApi.FormFieldBoolean value.
public static FormField FromFormFieldBoolean(FormFieldBoolean value)
Parameters
valueFormFieldBoolean
Returns
FromFormFieldCards(FormFieldCards)
Factory method to create a union from a Auth0.ManagementApi.FormFieldCards value.
public static FormField FromFormFieldCards(FormFieldCards value)
Parameters
valueFormFieldCards
Returns
FromFormFieldChoice(FormFieldChoice)
Factory method to create a union from a Auth0.ManagementApi.FormFieldChoice value.
public static FormField FromFormFieldChoice(FormFieldChoice value)
Parameters
valueFormFieldChoice
Returns
FromFormFieldCustom(FormFieldCustom)
Factory method to create a union from a Auth0.ManagementApi.FormFieldCustom value.
public static FormField FromFormFieldCustom(FormFieldCustom value)
Parameters
valueFormFieldCustom
Returns
FromFormFieldDate(FormFieldDate)
Factory method to create a union from a Auth0.ManagementApi.FormFieldDate value.
public static FormField FromFormFieldDate(FormFieldDate value)
Parameters
valueFormFieldDate
Returns
FromFormFieldDropdown(FormFieldDropdown)
Factory method to create a union from a Auth0.ManagementApi.FormFieldDropdown value.
public static FormField FromFormFieldDropdown(FormFieldDropdown value)
Parameters
valueFormFieldDropdown
Returns
FromFormFieldEmail(FormFieldEmail)
Factory method to create a union from a Auth0.ManagementApi.FormFieldEmail value.
public static FormField FromFormFieldEmail(FormFieldEmail value)
Parameters
valueFormFieldEmail
Returns
FromFormFieldFile(FormFieldFile)
Factory method to create a union from a Auth0.ManagementApi.FormFieldFile value.
public static FormField FromFormFieldFile(FormFieldFile value)
Parameters
valueFormFieldFile
Returns
FromFormFieldLegal(FormFieldLegal)
Factory method to create a union from a Auth0.ManagementApi.FormFieldLegal value.
public static FormField FromFormFieldLegal(FormFieldLegal value)
Parameters
valueFormFieldLegal
Returns
FromFormFieldNumber(FormFieldNumber)
Factory method to create a union from a Auth0.ManagementApi.FormFieldNumber value.
public static FormField FromFormFieldNumber(FormFieldNumber value)
Parameters
valueFormFieldNumber
Returns
FromFormFieldPassword(FormFieldPassword)
Factory method to create a union from a Auth0.ManagementApi.FormFieldPassword value.
public static FormField FromFormFieldPassword(FormFieldPassword value)
Parameters
valueFormFieldPassword
Returns
FromFormFieldPayment(FormFieldPayment)
Factory method to create a union from a Auth0.ManagementApi.FormFieldPayment value.
public static FormField FromFormFieldPayment(FormFieldPayment value)
Parameters
valueFormFieldPayment
Returns
FromFormFieldSocial(FormFieldSocial)
Factory method to create a union from a Auth0.ManagementApi.FormFieldSocial value.
public static FormField FromFormFieldSocial(FormFieldSocial value)
Parameters
valueFormFieldSocial
Returns
FromFormFieldTel(FormFieldTel)
Factory method to create a union from a Auth0.ManagementApi.FormFieldTel value.
public static FormField FromFormFieldTel(FormFieldTel value)
Parameters
valueFormFieldTel
Returns
FromFormFieldText(FormFieldText)
Factory method to create a union from a Auth0.ManagementApi.FormFieldText value.
public static FormField FromFormFieldText(FormFieldText value)
Parameters
valueFormFieldText
Returns
FromFormFieldUrl(FormFieldUrl)
Factory method to create a union from a Auth0.ManagementApi.FormFieldUrl value.
public static FormField FromFormFieldUrl(FormFieldUrl value)
Parameters
valueFormFieldUrl
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
IsFormFieldBoolean()
Returns true if Type is "formFieldBoolean"
public bool IsFormFieldBoolean()
Returns
IsFormFieldCards()
Returns true if Type is "formFieldCards"
public bool IsFormFieldCards()
Returns
IsFormFieldChoice()
Returns true if Type is "formFieldChoice"
public bool IsFormFieldChoice()
Returns
IsFormFieldCustom()
Returns true if Type is "formFieldCustom"
public bool IsFormFieldCustom()
Returns
IsFormFieldDate()
Returns true if Type is "formFieldDate"
public bool IsFormFieldDate()
Returns
IsFormFieldDropdown()
Returns true if Type is "formFieldDropdown"
public bool IsFormFieldDropdown()
Returns
IsFormFieldEmail()
Returns true if Type is "formFieldEmail"
public bool IsFormFieldEmail()
Returns
IsFormFieldFile()
Returns true if Type is "formFieldFile"
public bool IsFormFieldFile()
Returns
IsFormFieldLegal()
Returns true if Type is "formFieldLegal"
public bool IsFormFieldLegal()
Returns
IsFormFieldNumber()
Returns true if Type is "formFieldNumber"
public bool IsFormFieldNumber()
Returns
IsFormFieldPassword()
Returns true if Type is "formFieldPassword"
public bool IsFormFieldPassword()
Returns
IsFormFieldPayment()
Returns true if Type is "formFieldPayment"
public bool IsFormFieldPayment()
Returns
IsFormFieldSocial()
Returns true if Type is "formFieldSocial"
public bool IsFormFieldSocial()
Returns
IsFormFieldTel()
Returns true if Type is "formFieldTel"
public bool IsFormFieldTel()
Returns
IsFormFieldText()
Returns true if Type is "formFieldText"
public bool IsFormFieldText()
Returns
IsFormFieldUrl()
Returns true if Type is "formFieldUrl"
public bool IsFormFieldUrl()
Returns
Match<T>(Func<FormFieldBoolean, T>, Func<FormFieldCards, T>, Func<FormFieldChoice, T>, Func<FormFieldCustom, T>, Func<FormFieldDate, T>, Func<FormFieldDropdown, T>, Func<FormFieldEmail, T>, Func<FormFieldFile, T>, Func<FormFieldLegal, T>, Func<FormFieldNumber, T>, Func<FormFieldPassword, T>, Func<FormFieldPayment, T>, Func<FormFieldSocial, T>, Func<FormFieldTel, T>, Func<FormFieldText, T>, Func<FormFieldUrl, T>)
public T Match<T>(Func<FormFieldBoolean, T> onFormFieldBoolean, Func<FormFieldCards, T> onFormFieldCards, Func<FormFieldChoice, T> onFormFieldChoice, Func<FormFieldCustom, T> onFormFieldCustom, Func<FormFieldDate, T> onFormFieldDate, Func<FormFieldDropdown, T> onFormFieldDropdown, Func<FormFieldEmail, T> onFormFieldEmail, Func<FormFieldFile, T> onFormFieldFile, Func<FormFieldLegal, T> onFormFieldLegal, Func<FormFieldNumber, T> onFormFieldNumber, Func<FormFieldPassword, T> onFormFieldPassword, Func<FormFieldPayment, T> onFormFieldPayment, Func<FormFieldSocial, T> onFormFieldSocial, Func<FormFieldTel, T> onFormFieldTel, Func<FormFieldText, T> onFormFieldText, Func<FormFieldUrl, T> onFormFieldUrl)
Parameters
onFormFieldBooleanFunc<FormFieldBoolean, T>onFormFieldCardsFunc<FormFieldCards, T>onFormFieldChoiceFunc<FormFieldChoice, T>onFormFieldCustomFunc<FormFieldCustom, T>onFormFieldDateFunc<FormFieldDate, T>onFormFieldDropdownFunc<FormFieldDropdown, T>onFormFieldEmailFunc<FormFieldEmail, T>onFormFieldFileFunc<FormFieldFile, T>onFormFieldLegalFunc<FormFieldLegal, T>onFormFieldNumberFunc<FormFieldNumber, T>onFormFieldPasswordFunc<FormFieldPassword, T>onFormFieldPaymentFunc<FormFieldPayment, T>onFormFieldSocialFunc<FormFieldSocial, T>onFormFieldTelFunc<FormFieldTel, T>onFormFieldTextFunc<FormFieldText, T>onFormFieldUrlFunc<FormFieldUrl, 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.
TryGetFormFieldBoolean(out FormFieldBoolean?)
Attempts to cast the value to a FormFieldBoolean and returns true if successful.
public bool TryGetFormFieldBoolean(out FormFieldBoolean? value)
Parameters
valueFormFieldBoolean
Returns
TryGetFormFieldCards(out FormFieldCards?)
Attempts to cast the value to a FormFieldCards and returns true if successful.
public bool TryGetFormFieldCards(out FormFieldCards? value)
Parameters
valueFormFieldCards
Returns
TryGetFormFieldChoice(out FormFieldChoice?)
Attempts to cast the value to a FormFieldChoice and returns true if successful.
public bool TryGetFormFieldChoice(out FormFieldChoice? value)
Parameters
valueFormFieldChoice
Returns
TryGetFormFieldCustom(out FormFieldCustom?)
Attempts to cast the value to a FormFieldCustom and returns true if successful.
public bool TryGetFormFieldCustom(out FormFieldCustom? value)
Parameters
valueFormFieldCustom
Returns
TryGetFormFieldDate(out FormFieldDate?)
Attempts to cast the value to a FormFieldDate and returns true if successful.
public bool TryGetFormFieldDate(out FormFieldDate? value)
Parameters
valueFormFieldDate
Returns
TryGetFormFieldDropdown(out FormFieldDropdown?)
Attempts to cast the value to a FormFieldDropdown and returns true if successful.
public bool TryGetFormFieldDropdown(out FormFieldDropdown? value)
Parameters
valueFormFieldDropdown
Returns
TryGetFormFieldEmail(out FormFieldEmail?)
Attempts to cast the value to a FormFieldEmail and returns true if successful.
public bool TryGetFormFieldEmail(out FormFieldEmail? value)
Parameters
valueFormFieldEmail
Returns
TryGetFormFieldFile(out FormFieldFile?)
Attempts to cast the value to a FormFieldFile and returns true if successful.
public bool TryGetFormFieldFile(out FormFieldFile? value)
Parameters
valueFormFieldFile
Returns
TryGetFormFieldLegal(out FormFieldLegal?)
Attempts to cast the value to a FormFieldLegal and returns true if successful.
public bool TryGetFormFieldLegal(out FormFieldLegal? value)
Parameters
valueFormFieldLegal
Returns
TryGetFormFieldNumber(out FormFieldNumber?)
Attempts to cast the value to a FormFieldNumber and returns true if successful.
public bool TryGetFormFieldNumber(out FormFieldNumber? value)
Parameters
valueFormFieldNumber
Returns
TryGetFormFieldPassword(out FormFieldPassword?)
Attempts to cast the value to a FormFieldPassword and returns true if successful.
public bool TryGetFormFieldPassword(out FormFieldPassword? value)
Parameters
valueFormFieldPassword
Returns
TryGetFormFieldPayment(out FormFieldPayment?)
Attempts to cast the value to a FormFieldPayment and returns true if successful.
public bool TryGetFormFieldPayment(out FormFieldPayment? value)
Parameters
valueFormFieldPayment
Returns
TryGetFormFieldSocial(out FormFieldSocial?)
Attempts to cast the value to a FormFieldSocial and returns true if successful.
public bool TryGetFormFieldSocial(out FormFieldSocial? value)
Parameters
valueFormFieldSocial
Returns
TryGetFormFieldTel(out FormFieldTel?)
Attempts to cast the value to a FormFieldTel and returns true if successful.
public bool TryGetFormFieldTel(out FormFieldTel? value)
Parameters
valueFormFieldTel
Returns
TryGetFormFieldText(out FormFieldText?)
Attempts to cast the value to a FormFieldText and returns true if successful.
public bool TryGetFormFieldText(out FormFieldText? value)
Parameters
valueFormFieldText
Returns
TryGetFormFieldUrl(out FormFieldUrl?)
Attempts to cast the value to a FormFieldUrl and returns true if successful.
public bool TryGetFormFieldUrl(out FormFieldUrl? value)
Parameters
valueFormFieldUrl
Returns
Visit(Action<FormFieldBoolean>, Action<FormFieldCards>, Action<FormFieldChoice>, Action<FormFieldCustom>, Action<FormFieldDate>, Action<FormFieldDropdown>, Action<FormFieldEmail>, Action<FormFieldFile>, Action<FormFieldLegal>, Action<FormFieldNumber>, Action<FormFieldPassword>, Action<FormFieldPayment>, Action<FormFieldSocial>, Action<FormFieldTel>, Action<FormFieldText>, Action<FormFieldUrl>)
public void Visit(Action<FormFieldBoolean> onFormFieldBoolean, Action<FormFieldCards> onFormFieldCards, Action<FormFieldChoice> onFormFieldChoice, Action<FormFieldCustom> onFormFieldCustom, Action<FormFieldDate> onFormFieldDate, Action<FormFieldDropdown> onFormFieldDropdown, Action<FormFieldEmail> onFormFieldEmail, Action<FormFieldFile> onFormFieldFile, Action<FormFieldLegal> onFormFieldLegal, Action<FormFieldNumber> onFormFieldNumber, Action<FormFieldPassword> onFormFieldPassword, Action<FormFieldPayment> onFormFieldPayment, Action<FormFieldSocial> onFormFieldSocial, Action<FormFieldTel> onFormFieldTel, Action<FormFieldText> onFormFieldText, Action<FormFieldUrl> onFormFieldUrl)
Parameters
onFormFieldBooleanAction<FormFieldBoolean>onFormFieldCardsAction<FormFieldCards>onFormFieldChoiceAction<FormFieldChoice>onFormFieldCustomAction<FormFieldCustom>onFormFieldDateAction<FormFieldDate>onFormFieldDropdownAction<FormFieldDropdown>onFormFieldEmailAction<FormFieldEmail>onFormFieldFileAction<FormFieldFile>onFormFieldLegalAction<FormFieldLegal>onFormFieldNumberAction<FormFieldNumber>onFormFieldPasswordAction<FormFieldPassword>onFormFieldPaymentAction<FormFieldPayment>onFormFieldSocialAction<FormFieldSocial>onFormFieldTelAction<FormFieldTel>onFormFieldTextAction<FormFieldText>onFormFieldUrlAction<FormFieldUrl>
Operators
implicit operator FormField(FormFieldBoolean)
public static implicit operator FormField(FormFieldBoolean value)
Parameters
valueFormFieldBoolean
Returns
implicit operator FormField(FormFieldCards)
public static implicit operator FormField(FormFieldCards value)
Parameters
valueFormFieldCards
Returns
implicit operator FormField(FormFieldChoice)
public static implicit operator FormField(FormFieldChoice value)
Parameters
valueFormFieldChoice
Returns
implicit operator FormField(FormFieldCustom)
public static implicit operator FormField(FormFieldCustom value)
Parameters
valueFormFieldCustom
Returns
implicit operator FormField(FormFieldDate)
public static implicit operator FormField(FormFieldDate value)
Parameters
valueFormFieldDate
Returns
implicit operator FormField(FormFieldDropdown)
public static implicit operator FormField(FormFieldDropdown value)
Parameters
valueFormFieldDropdown
Returns
implicit operator FormField(FormFieldEmail)
public static implicit operator FormField(FormFieldEmail value)
Parameters
valueFormFieldEmail
Returns
implicit operator FormField(FormFieldFile)
public static implicit operator FormField(FormFieldFile value)
Parameters
valueFormFieldFile
Returns
implicit operator FormField(FormFieldLegal)
public static implicit operator FormField(FormFieldLegal value)
Parameters
valueFormFieldLegal
Returns
implicit operator FormField(FormFieldNumber)
public static implicit operator FormField(FormFieldNumber value)
Parameters
valueFormFieldNumber
Returns
implicit operator FormField(FormFieldPassword)
public static implicit operator FormField(FormFieldPassword value)
Parameters
valueFormFieldPassword
Returns
implicit operator FormField(FormFieldPayment)
public static implicit operator FormField(FormFieldPayment value)
Parameters
valueFormFieldPayment
Returns
implicit operator FormField(FormFieldSocial)
public static implicit operator FormField(FormFieldSocial value)
Parameters
valueFormFieldSocial
Returns
implicit operator FormField(FormFieldTel)
public static implicit operator FormField(FormFieldTel value)
Parameters
valueFormFieldTel
Returns
implicit operator FormField(FormFieldText)
public static implicit operator FormField(FormFieldText value)
Parameters
valueFormFieldText
Returns
implicit operator FormField(FormFieldUrl)
public static implicit operator FormField(FormFieldUrl value)
Parameters
valueFormFieldUrl