pulumi/tests/testdata/codegen/different-enum/dotnet/Tree/V1/Enums.cs

136 lines
5.1 KiB
C#

// *** WARNING: this file was generated by test. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.ComponentModel;
using Pulumi;
namespace Pulumi.Plant.Tree.V1
{
[EnumType]
public readonly struct Diameter : IEquatable<Diameter>
{
private readonly double _value;
private Diameter(double value)
{
_value = value;
}
public static Diameter Sixinch { get; } = new Diameter(6);
public static Diameter Twelveinch { get; } = new Diameter(12);
public static bool operator ==(Diameter left, Diameter right) => left.Equals(right);
public static bool operator !=(Diameter left, Diameter right) => !left.Equals(right);
public static explicit operator double(Diameter value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is Diameter other && Equals(other);
public bool Equals(Diameter other) => _value == other._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value.GetHashCode();
public override string ToString() => _value.ToString();
}
[EnumType]
public readonly struct Farm : IEquatable<Farm>
{
private readonly string _value;
private Farm(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
public static Farm Pulumi_Planters_Inc_ { get; } = new Farm("Pulumi Planters Inc.");
public static Farm Plants_R_Us { get; } = new Farm("Plants'R'Us");
public static bool operator ==(Farm left, Farm right) => left.Equals(right);
public static bool operator !=(Farm left, Farm right) => !left.Equals(right);
public static explicit operator string(Farm value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is Farm other && Equals(other);
public bool Equals(Farm other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
/// <summary>
/// types of rubber trees
/// </summary>
[EnumType]
public readonly struct RubberTreeVariety : IEquatable<RubberTreeVariety>
{
private readonly string _value;
private RubberTreeVariety(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
/// <summary>
/// A burgundy rubber tree.
/// </summary>
public static RubberTreeVariety Burgundy { get; } = new RubberTreeVariety("Burgundy");
/// <summary>
/// A ruby rubber tree.
/// </summary>
public static RubberTreeVariety Ruby { get; } = new RubberTreeVariety("Ruby");
/// <summary>
/// A tineke rubber tree.
/// </summary>
public static RubberTreeVariety Tineke { get; } = new RubberTreeVariety("Tineke");
public static bool operator ==(RubberTreeVariety left, RubberTreeVariety right) => left.Equals(right);
public static bool operator !=(RubberTreeVariety left, RubberTreeVariety right) => !left.Equals(right);
public static explicit operator string(RubberTreeVariety value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is RubberTreeVariety other && Equals(other);
public bool Equals(RubberTreeVariety other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
[EnumType]
public readonly struct TreeSize : IEquatable<TreeSize>
{
private readonly string _value;
private TreeSize(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
public static TreeSize Small { get; } = new TreeSize("small");
public static TreeSize Medium { get; } = new TreeSize("medium");
public static TreeSize Large { get; } = new TreeSize("large");
public static bool operator ==(TreeSize left, TreeSize right) => left.Equals(right);
public static bool operator !=(TreeSize left, TreeSize right) => !left.Equals(right);
public static explicit operator string(TreeSize value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is TreeSize other && Equals(other);
public bool Equals(TreeSize other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
}