| | 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.Search.Documents.Indexes.Models |
| | 12 | | { |
| | 13 | | /// <summary> The strings indicating what visual feature types to return. </summary> |
| | 14 | | public readonly partial struct VisualFeature : IEquatable<VisualFeature> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="VisualFeature"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public VisualFeature(string value) |
| | 21 | | { |
| 0 | 22 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 0 | 23 | | } |
| | 24 | |
|
| | 25 | | private const string AdultValue = "adult"; |
| | 26 | | private const string BrandsValue = "brands"; |
| | 27 | | private const string CategoriesValue = "categories"; |
| | 28 | | private const string DescriptionValue = "description"; |
| | 29 | | private const string FacesValue = "faces"; |
| | 30 | | private const string ObjectsValue = "objects"; |
| | 31 | | private const string TagsValue = "tags"; |
| | 32 | |
|
| | 33 | | /// <summary> Visual features recognized as adult persons. </summary> |
| 0 | 34 | | public static VisualFeature Adult { get; } = new VisualFeature(AdultValue); |
| | 35 | | /// <summary> Visual features recognized as commercial brands. </summary> |
| 0 | 36 | | public static VisualFeature Brands { get; } = new VisualFeature(BrandsValue); |
| | 37 | | /// <summary> Categories. </summary> |
| 0 | 38 | | public static VisualFeature Categories { get; } = new VisualFeature(CategoriesValue); |
| | 39 | | /// <summary> Description. </summary> |
| 0 | 40 | | public static VisualFeature Description { get; } = new VisualFeature(DescriptionValue); |
| | 41 | | /// <summary> Visual features recognized as people faces. </summary> |
| 0 | 42 | | public static VisualFeature Faces { get; } = new VisualFeature(FacesValue); |
| | 43 | | /// <summary> Visual features recognized as objects. </summary> |
| 0 | 44 | | public static VisualFeature Objects { get; } = new VisualFeature(ObjectsValue); |
| | 45 | | /// <summary> Tags. </summary> |
| 0 | 46 | | public static VisualFeature Tags { get; } = new VisualFeature(TagsValue); |
| | 47 | | /// <summary> Determines if two <see cref="VisualFeature"/> values are the same. </summary> |
| 0 | 48 | | public static bool operator ==(VisualFeature left, VisualFeature right) => left.Equals(right); |
| | 49 | | /// <summary> Determines if two <see cref="VisualFeature"/> values are not the same. </summary> |
| 0 | 50 | | public static bool operator !=(VisualFeature left, VisualFeature right) => !left.Equals(right); |
| | 51 | | /// <summary> Converts a string to a <see cref="VisualFeature"/>. </summary> |
| 0 | 52 | | public static implicit operator VisualFeature(string value) => new VisualFeature(value); |
| | 53 | |
|
| | 54 | | /// <inheritdoc /> |
| | 55 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 56 | | public override bool Equals(object obj) => obj is VisualFeature other && Equals(other); |
| | 57 | | /// <inheritdoc /> |
| 0 | 58 | | public bool Equals(VisualFeature other) => string.Equals(_value, other._value, StringComparison.InvariantCulture |
| | 59 | |
|
| | 60 | | /// <inheritdoc /> |
| | 61 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 62 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 63 | | /// <inheritdoc /> |
| 0 | 64 | | public override string ToString() => _value; |
| | 65 | | } |
| | 66 | | } |