Class EnumType
(experimental) Enum Types are abstract types that includes a set of fields that represent the strings this type can create.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.AWS.AppSync.dll
Syntax (csharp)
public class EnumType : DeputyBase, IIntermediateType
Syntax (vb)
Public Class EnumType
Inherits DeputyBase
Implements IIntermediateType
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
GraphqlApi api;
var episode = new EnumType("Episode", new EnumTypeOptions {
Definition = new [] { "NEWHOPE", "EMPIRE", "JEDI" }
});
api.AddType(episode);
Synopsis
Constructors
EnumType(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
EnumType(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
EnumType(String, IEnumTypeOptions) |
Properties
Definition | (experimental) the attributes of this type. |
Modes | (experimental) the authorization modes for this intermediate type. |
Name | (experimental) the name of this type. |
Methods
AddField(IAddFieldOptions) | (experimental) Add a field to this Enum Type. |
Attribute(IBaseTypeOptions) | (experimental) Create an GraphQL Type representing this Enum Type. |
ToString() | (experimental) Generate the string of this enum type. |
Constructors
EnumType(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected EnumType(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
EnumType(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected EnumType(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
EnumType(String, IEnumTypeOptions)
public EnumType(string name, IEnumTypeOptions options)
Parameters
- name System.String
- options IEnumTypeOptions
Remarks
Stability: Experimental
Properties
Definition
(experimental) the attributes of this type.
public virtual IDictionary<string, IField> Definition { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, IField>
Remarks
Stability: Experimental
Modes
(experimental) the authorization modes for this intermediate type.
protected virtual AuthorizationType[] Modes { get; set; }
Property Value
Remarks
Stability: Experimental
Name
(experimental) the name of this type.
public virtual string Name { get; }
Property Value
System.String
Remarks
Stability: Experimental
Methods
AddField(IAddFieldOptions)
(experimental) Add a field to this Enum Type.
public virtual void AddField(IAddFieldOptions options)
Parameters
- options IAddFieldOptions
the options to add a field.
Remarks
To add a field to this Enum Type, you must only configure addField with the fieldName options.
Stability: Experimental
Attribute(IBaseTypeOptions)
(experimental) Create an GraphQL Type representing this Enum Type.
public virtual GraphqlType Attribute(IBaseTypeOptions options = null)
Parameters
- options IBaseTypeOptions
Returns
Remarks
Stability: Experimental
ToString()
(experimental) Generate the string of this enum type.
public override string ToString()
Returns
System.String
Remarks
Stability: Experimental