mirror of https://github.com/pulumi/pulumi.git
94 lines
3.7 KiB
C#
94 lines
3.7 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.Example
|
|
{
|
|
[EnumType]
|
|
public readonly struct ExampleEnum : IEquatable<ExampleEnum>
|
|
{
|
|
private readonly string _value;
|
|
|
|
private ExampleEnum(string value)
|
|
{
|
|
_value = value ?? throw new ArgumentNullException(nameof(value));
|
|
}
|
|
|
|
public static ExampleEnum One { get; } = new ExampleEnum("one");
|
|
public static ExampleEnum Two { get; } = new ExampleEnum("two");
|
|
|
|
public static bool operator ==(ExampleEnum left, ExampleEnum right) => left.Equals(right);
|
|
public static bool operator !=(ExampleEnum left, ExampleEnum right) => !left.Equals(right);
|
|
|
|
public static explicit operator string(ExampleEnum value) => value._value;
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
public override bool Equals(object? obj) => obj is ExampleEnum other && Equals(other);
|
|
public bool Equals(ExampleEnum 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 ExampleEnumInput : IEquatable<ExampleEnumInput>
|
|
{
|
|
private readonly string _value;
|
|
|
|
private ExampleEnumInput(string value)
|
|
{
|
|
_value = value ?? throw new ArgumentNullException(nameof(value));
|
|
}
|
|
|
|
public static ExampleEnumInput One { get; } = new ExampleEnumInput("one");
|
|
public static ExampleEnumInput Two { get; } = new ExampleEnumInput("two");
|
|
|
|
public static bool operator ==(ExampleEnumInput left, ExampleEnumInput right) => left.Equals(right);
|
|
public static bool operator !=(ExampleEnumInput left, ExampleEnumInput right) => !left.Equals(right);
|
|
|
|
public static explicit operator string(ExampleEnumInput value) => value._value;
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
public override bool Equals(object? obj) => obj is ExampleEnumInput other && Equals(other);
|
|
public bool Equals(ExampleEnumInput 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 ResourceType : IEquatable<ResourceType>
|
|
{
|
|
private readonly string _value;
|
|
|
|
private ResourceType(string value)
|
|
{
|
|
_value = value ?? throw new ArgumentNullException(nameof(value));
|
|
}
|
|
|
|
public static ResourceType Haha { get; } = new ResourceType("haha");
|
|
public static ResourceType Business { get; } = new ResourceType("business");
|
|
|
|
public static bool operator ==(ResourceType left, ResourceType right) => left.Equals(right);
|
|
public static bool operator !=(ResourceType left, ResourceType right) => !left.Equals(right);
|
|
|
|
public static explicit operator string(ResourceType value) => value._value;
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
public override bool Equals(object? obj) => obj is ResourceType other && Equals(other);
|
|
public bool Equals(ResourceType other) => string.Equals(_value, other._value, StringComparison.Ordinal);
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
|
|
|
|
public override string ToString() => _value;
|
|
}
|
|
}
|