github.com/cdmixer/woolloomooloo@v0.1.0/pkg/codegen/internal/test/testdata/simple-enum-schema/dotnet/Tree/V1/Enums.cs (about)

     1  // *** WARNING: this file was generated by test. ***
     2  // *** Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  using System;
     5  using System.ComponentModel;
     6  using Pulumi;
     7  
     8  namespace Pulumi.PlantProvider.Tree.V1
     9  {
    10      [EnumType]
    11      public readonly struct Farm : IEquatable<Farm>
    12      {
    13          private readonly string _value;
    14  
    15          private Farm(string value)
    16          {
    17              _value = value ?? throw new ArgumentNullException(nameof(value));
    18          }
    19  
    20          public static Farm Pulumi_Planters_Inc_ { get; } = new Farm("Pulumi Planters Inc.");
    21          public static Farm Plants_R_Us { get; } = new Farm("Plants'R'Us");
    22  
    23          public static bool operator ==(Farm left, Farm right) => left.Equals(right);
    24          public static bool operator !=(Farm left, Farm right) => !left.Equals(right);
    25  
    26          public static explicit operator string(Farm value) => value._value;
    27  
    28          [EditorBrowsable(EditorBrowsableState.Never)]
    29          public override bool Equals(object? obj) => obj is Farm other && Equals(other);
    30          public bool Equals(Farm other) => string.Equals(_value, other._value, StringComparison.Ordinal);
    31  
    32          [EditorBrowsable(EditorBrowsableState.Never)]
    33          public override int GetHashCode() => _value?.GetHashCode() ?? 0;
    34  
    35          public override string ToString() => _value;
    36      }
    37  
    38      /// <summary>
    39      /// types of rubber trees
    40      /// </summary>
    41      [EnumType]
    42      public readonly struct RubberTreeVariety : IEquatable<RubberTreeVariety>
    43      {
    44          private readonly string _value;
    45  
    46          private RubberTreeVariety(string value)
    47          {
    48              _value = value ?? throw new ArgumentNullException(nameof(value));
    49          }
    50  
    51          /// <summary>
    52          /// A burgundy rubber tree.
    53          /// </summary>
    54          public static RubberTreeVariety Burgundy { get; } = new RubberTreeVariety("Burgundy");
    55          /// <summary>
    56          /// A ruby rubber tree.
    57          /// </summary>
    58          public static RubberTreeVariety Ruby { get; } = new RubberTreeVariety("Ruby");
    59          /// <summary>
    60          /// A tineke rubber tree.
    61          /// </summary>
    62          public static RubberTreeVariety Tineke { get; } = new RubberTreeVariety("Tineke");
    63  
    64          public static bool operator ==(RubberTreeVariety left, RubberTreeVariety right) => left.Equals(right);
    65          public static bool operator !=(RubberTreeVariety left, RubberTreeVariety right) => !left.Equals(right);
    66  
    67          public static explicit operator string(RubberTreeVariety value) => value._value;
    68  
    69          [EditorBrowsable(EditorBrowsableState.Never)]
    70          public override bool Equals(object? obj) => obj is RubberTreeVariety other && Equals(other);
    71          public bool Equals(RubberTreeVariety other) => string.Equals(_value, other._value, StringComparison.Ordinal);
    72  
    73          [EditorBrowsable(EditorBrowsableState.Never)]
    74          public override int GetHashCode() => _value?.GetHashCode() ?? 0;
    75  
    76          public override string ToString() => _value;
    77      }
    78  }