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

126 lines
5.0 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
{
/// <summary>
/// The log_name to populate in the Cloud Audit Record. This is added to regress pulumi/pulumi issue #7913
/// </summary>
[EnumType]
public readonly struct CloudAuditOptionsLogName : IEquatable<CloudAuditOptionsLogName>
{
private readonly string _value;
private CloudAuditOptionsLogName(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
/// <summary>
/// Default. Should not be used.
/// </summary>
public static CloudAuditOptionsLogName UnspecifiedLogName { get; } = new CloudAuditOptionsLogName("UNSPECIFIED_LOG_NAME");
/// <summary>
/// Corresponds to "cloudaudit.googleapis.com/activity"
/// </summary>
public static CloudAuditOptionsLogName AdminActivity { get; } = new CloudAuditOptionsLogName("ADMIN_ACTIVITY");
/// <summary>
/// Corresponds to "cloudaudit.googleapis.com/data_access"
/// </summary>
public static CloudAuditOptionsLogName DataAccess { get; } = new CloudAuditOptionsLogName("DATA_ACCESS");
/// <summary>
/// What if triple quotes """ are used in the description
/// </summary>
public static CloudAuditOptionsLogName Synthetic { get; } = new CloudAuditOptionsLogName("SYNTHETIC");
public static bool operator ==(CloudAuditOptionsLogName left, CloudAuditOptionsLogName right) => left.Equals(right);
public static bool operator !=(CloudAuditOptionsLogName left, CloudAuditOptionsLogName right) => !left.Equals(right);
public static explicit operator string(CloudAuditOptionsLogName value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is CloudAuditOptionsLogName other && Equals(other);
public bool Equals(CloudAuditOptionsLogName 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 ContainerBrightness : IEquatable<ContainerBrightness>
{
private readonly double _value;
private ContainerBrightness(double value)
{
_value = value;
}
public static ContainerBrightness ZeroPointOne { get; } = new ContainerBrightness(0.1);
public static ContainerBrightness One { get; } = new ContainerBrightness(1);
public static bool operator ==(ContainerBrightness left, ContainerBrightness right) => left.Equals(right);
public static bool operator !=(ContainerBrightness left, ContainerBrightness right) => !left.Equals(right);
public static explicit operator double(ContainerBrightness value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is ContainerBrightness other && Equals(other);
public bool Equals(ContainerBrightness other) => _value == other._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value.GetHashCode();
public override string ToString() => _value.ToString();
}
/// <summary>
/// plant container colors
/// </summary>
[EnumType]
public readonly struct ContainerColor : IEquatable<ContainerColor>
{
private readonly string _value;
private ContainerColor(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
public static ContainerColor Red { get; } = new ContainerColor("red");
public static ContainerColor Blue { get; } = new ContainerColor("blue");
public static ContainerColor Yellow { get; } = new ContainerColor("yellow");
public static bool operator ==(ContainerColor left, ContainerColor right) => left.Equals(right);
public static bool operator !=(ContainerColor left, ContainerColor right) => !left.Equals(right);
public static explicit operator string(ContainerColor value) => value._value;
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => obj is ContainerColor other && Equals(other);
public bool Equals(ContainerColor other) => string.Equals(_value, other._value, StringComparison.Ordinal);
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
public override string ToString() => _value;
}
/// <summary>
/// plant container sizes
/// </summary>
public enum ContainerSize
{
FourInch = 4,
SixInch = 6,
[Obsolete(@"Eight inch pots are no longer supported.")]
EightInch = 8,
}
}