github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/simple-enum-schema/dotnet/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.Plant 9 { 10 /// <summary> 11 /// The log_name to populate in the Cloud Audit Record. This is added to regress pulumi/pulumi issue #7913 12 /// </summary> 13 [EnumType] 14 public readonly struct CloudAuditOptionsLogName : IEquatable<CloudAuditOptionsLogName> 15 { 16 private readonly string _value; 17 18 private CloudAuditOptionsLogName(string value) 19 { 20 _value = value ?? throw new ArgumentNullException(nameof(value)); 21 } 22 23 /// <summary> 24 /// Default. Should not be used. 25 /// </summary> 26 public static CloudAuditOptionsLogName UnspecifiedLogName { get; } = new CloudAuditOptionsLogName("UNSPECIFIED_LOG_NAME"); 27 /// <summary> 28 /// Corresponds to "cloudaudit.googleapis.com/activity" 29 /// </summary> 30 public static CloudAuditOptionsLogName AdminActivity { get; } = new CloudAuditOptionsLogName("ADMIN_ACTIVITY"); 31 /// <summary> 32 /// Corresponds to "cloudaudit.googleapis.com/data_access" 33 /// </summary> 34 public static CloudAuditOptionsLogName DataAccess { get; } = new CloudAuditOptionsLogName("DATA_ACCESS"); 35 /// <summary> 36 /// What if triple quotes """ are used in the description 37 /// </summary> 38 public static CloudAuditOptionsLogName Synthetic { get; } = new CloudAuditOptionsLogName("SYNTHETIC"); 39 public static CloudAuditOptionsLogName CloudAuditOptionsLogName_NO_NAME { get; } = new CloudAuditOptionsLogName("_NO_NAME"); 40 41 public static bool operator ==(CloudAuditOptionsLogName left, CloudAuditOptionsLogName right) => left.Equals(right); 42 public static bool operator !=(CloudAuditOptionsLogName left, CloudAuditOptionsLogName right) => !left.Equals(right); 43 44 public static explicit operator string(CloudAuditOptionsLogName value) => value._value; 45 46 [EditorBrowsable(EditorBrowsableState.Never)] 47 public override bool Equals(object? obj) => obj is CloudAuditOptionsLogName other && Equals(other); 48 public bool Equals(CloudAuditOptionsLogName other) => string.Equals(_value, other._value, StringComparison.Ordinal); 49 50 [EditorBrowsable(EditorBrowsableState.Never)] 51 public override int GetHashCode() => _value?.GetHashCode() ?? 0; 52 53 public override string ToString() => _value; 54 } 55 56 [EnumType] 57 public readonly struct ContainerBrightness : IEquatable<ContainerBrightness> 58 { 59 private readonly double _value; 60 61 private ContainerBrightness(double value) 62 { 63 _value = value; 64 } 65 66 public static ContainerBrightness ZeroPointOne { get; } = new ContainerBrightness(0.1); 67 public static ContainerBrightness One { get; } = new ContainerBrightness(1); 68 69 public static bool operator ==(ContainerBrightness left, ContainerBrightness right) => left.Equals(right); 70 public static bool operator !=(ContainerBrightness left, ContainerBrightness right) => !left.Equals(right); 71 72 public static explicit operator double(ContainerBrightness value) => value._value; 73 74 [EditorBrowsable(EditorBrowsableState.Never)] 75 public override bool Equals(object? obj) => obj is ContainerBrightness other && Equals(other); 76 public bool Equals(ContainerBrightness other) => _value == other._value; 77 78 [EditorBrowsable(EditorBrowsableState.Never)] 79 public override int GetHashCode() => _value.GetHashCode(); 80 81 public override string ToString() => _value.ToString(); 82 } 83 84 /// <summary> 85 /// plant container colors 86 /// </summary> 87 [EnumType] 88 public readonly struct ContainerColor : IEquatable<ContainerColor> 89 { 90 private readonly string _value; 91 92 private ContainerColor(string value) 93 { 94 _value = value ?? throw new ArgumentNullException(nameof(value)); 95 } 96 97 public static ContainerColor Red { get; } = new ContainerColor("red"); 98 public static ContainerColor Blue { get; } = new ContainerColor("blue"); 99 public static ContainerColor Yellow { get; } = new ContainerColor("yellow"); 100 101 public static bool operator ==(ContainerColor left, ContainerColor right) => left.Equals(right); 102 public static bool operator !=(ContainerColor left, ContainerColor right) => !left.Equals(right); 103 104 public static explicit operator string(ContainerColor value) => value._value; 105 106 [EditorBrowsable(EditorBrowsableState.Never)] 107 public override bool Equals(object? obj) => obj is ContainerColor other && Equals(other); 108 public bool Equals(ContainerColor other) => string.Equals(_value, other._value, StringComparison.Ordinal); 109 110 [EditorBrowsable(EditorBrowsableState.Never)] 111 public override int GetHashCode() => _value?.GetHashCode() ?? 0; 112 113 public override string ToString() => _value; 114 } 115 116 /// <summary> 117 /// plant container sizes 118 /// </summary> 119 public enum ContainerSize 120 { 121 FourInch = 4, 122 SixInch = 6, 123 [Obsolete(@"Eight inch pots are no longer supported.")] 124 EightInch = 8, 125 } 126 }