| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.ComponentModel; |
| | 10 | |
|
| | 11 | | namespace Azure.ResourceManager.Storage.Models |
| | 12 | | { |
| | 13 | | /// <summary> The CorsRuleAllowedMethodsItem. </summary> |
| | 14 | | public readonly partial struct CorsRuleAllowedMethodsItem : IEquatable<CorsRuleAllowedMethodsItem> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="CorsRuleAllowedMethodsItem"/> values are the same. </summary> |
| | 19 | | public CorsRuleAllowedMethodsItem(string value) |
| | 20 | | { |
| 240 | 21 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 240 | 22 | | } |
| | 23 | |
|
| | 24 | | private const string DeleteValue = "DELETE"; |
| | 25 | | private const string GETValue = "GET"; |
| | 26 | | private const string HeadValue = "HEAD"; |
| | 27 | | private const string MergeValue = "MERGE"; |
| | 28 | | private const string PostValue = "POST"; |
| | 29 | | private const string OptionsValue = "OPTIONS"; |
| | 30 | | private const string PUTValue = "PUT"; |
| | 31 | |
|
| | 32 | | /// <summary> DELETE. </summary> |
| 0 | 33 | | public static CorsRuleAllowedMethodsItem Delete { get; } = new CorsRuleAllowedMethodsItem(DeleteValue); |
| | 34 | | /// <summary> GET. </summary> |
| 0 | 35 | | public static CorsRuleAllowedMethodsItem GET { get; } = new CorsRuleAllowedMethodsItem(GETValue); |
| | 36 | | /// <summary> HEAD. </summary> |
| 0 | 37 | | public static CorsRuleAllowedMethodsItem Head { get; } = new CorsRuleAllowedMethodsItem(HeadValue); |
| | 38 | | /// <summary> MERGE. </summary> |
| 0 | 39 | | public static CorsRuleAllowedMethodsItem Merge { get; } = new CorsRuleAllowedMethodsItem(MergeValue); |
| | 40 | | /// <summary> POST. </summary> |
| 0 | 41 | | public static CorsRuleAllowedMethodsItem Post { get; } = new CorsRuleAllowedMethodsItem(PostValue); |
| | 42 | | /// <summary> OPTIONS. </summary> |
| 0 | 43 | | public static CorsRuleAllowedMethodsItem Options { get; } = new CorsRuleAllowedMethodsItem(OptionsValue); |
| | 44 | | /// <summary> PUT. </summary> |
| 0 | 45 | | public static CorsRuleAllowedMethodsItem PUT { get; } = new CorsRuleAllowedMethodsItem(PUTValue); |
| | 46 | | /// <summary> Determines if two <see cref="CorsRuleAllowedMethodsItem"/> values are the same. </summary> |
| 0 | 47 | | public static bool operator ==(CorsRuleAllowedMethodsItem left, CorsRuleAllowedMethodsItem right) => left.Equals |
| | 48 | | /// <summary> Determines if two <see cref="CorsRuleAllowedMethodsItem"/> values are not the same. </summary> |
| 0 | 49 | | public static bool operator !=(CorsRuleAllowedMethodsItem left, CorsRuleAllowedMethodsItem right) => !left.Equal |
| | 50 | | /// <summary> Converts a string to a <see cref="CorsRuleAllowedMethodsItem"/>. </summary> |
| 80 | 51 | | public static implicit operator CorsRuleAllowedMethodsItem(string value) => new CorsRuleAllowedMethodsItem(value |
| | 52 | |
|
| | 53 | | /// <inheritdoc /> |
| | 54 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 55 | | public override bool Equals(object obj) => obj is CorsRuleAllowedMethodsItem other && Equals(other); |
| | 56 | | /// <inheritdoc /> |
| 160 | 57 | | public bool Equals(CorsRuleAllowedMethodsItem other) => string.Equals(_value, other._value, StringComparison.Inv |
| | 58 | |
|
| | 59 | | /// <inheritdoc /> |
| | 60 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 61 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 62 | | /// <inheritdoc /> |
| 80 | 63 | | public override string ToString() => _value; |
| | 64 | | } |
| | 65 | | } |