| | 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> Defines the type of a datasource. </summary> |
| | 14 | | public readonly partial struct SearchIndexerDataSourceType : IEquatable<SearchIndexerDataSourceType> |
| | 15 | | { |
| | 16 | | private readonly string _value; |
| | 17 | |
|
| | 18 | | /// <summary> Determines if two <see cref="SearchIndexerDataSourceType"/> values are the same. </summary> |
| | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception> |
| | 20 | | public SearchIndexerDataSourceType(string value) |
| | 21 | | { |
| 14 | 22 | | _value = value ?? throw new ArgumentNullException(nameof(value)); |
| 14 | 23 | | } |
| | 24 | |
|
| | 25 | | private const string AzureSqlValue = "azuresql"; |
| | 26 | | private const string CosmosDbValue = "cosmosdb"; |
| | 27 | | private const string AzureBlobValue = "azureblob"; |
| | 28 | | private const string AzureTableValue = "azuretable"; |
| | 29 | | private const string MySqlValue = "mysql"; |
| | 30 | |
|
| | 31 | | /// <summary> Indicates an Azure SQL datasource. </summary> |
| 0 | 32 | | public static SearchIndexerDataSourceType AzureSql { get; } = new SearchIndexerDataSourceType(AzureSqlValue); |
| | 33 | | /// <summary> Indicates a CosmosDB datasource. </summary> |
| 0 | 34 | | public static SearchIndexerDataSourceType CosmosDb { get; } = new SearchIndexerDataSourceType(CosmosDbValue); |
| | 35 | | /// <summary> Indicates a Azure Blob datasource. </summary> |
| 9 | 36 | | public static SearchIndexerDataSourceType AzureBlob { get; } = new SearchIndexerDataSourceType(AzureBlobValue); |
| | 37 | | /// <summary> Indicates a Azure Table datasource. </summary> |
| 0 | 38 | | public static SearchIndexerDataSourceType AzureTable { get; } = new SearchIndexerDataSourceType(AzureTableValue) |
| | 39 | | /// <summary> Indicates a MySql datasource. </summary> |
| 0 | 40 | | public static SearchIndexerDataSourceType MySql { get; } = new SearchIndexerDataSourceType(MySqlValue); |
| | 41 | | /// <summary> Determines if two <see cref="SearchIndexerDataSourceType"/> values are the same. </summary> |
| 0 | 42 | | public static bool operator ==(SearchIndexerDataSourceType left, SearchIndexerDataSourceType right) => left.Equa |
| | 43 | | /// <summary> Determines if two <see cref="SearchIndexerDataSourceType"/> values are not the same. </summary> |
| 6 | 44 | | public static bool operator !=(SearchIndexerDataSourceType left, SearchIndexerDataSourceType right) => !left.Equ |
| | 45 | | /// <summary> Converts a string to a <see cref="SearchIndexerDataSourceType"/>. </summary> |
| 0 | 46 | | public static implicit operator SearchIndexerDataSourceType(string value) => new SearchIndexerDataSourceType(val |
| | 47 | |
|
| | 48 | | /// <inheritdoc /> |
| | 49 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 50 | | public override bool Equals(object obj) => obj is SearchIndexerDataSourceType other && Equals(other); |
| | 51 | | /// <inheritdoc /> |
| 6 | 52 | | public bool Equals(SearchIndexerDataSourceType other) => string.Equals(_value, other._value, StringComparison.In |
| | 53 | |
|
| | 54 | | /// <inheritdoc /> |
| | 55 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| 0 | 56 | | public override int GetHashCode() => _value?.GetHashCode() ?? 0; |
| | 57 | | /// <inheritdoc /> |
| 7 | 58 | | public override string ToString() => _value; |
| | 59 | | } |
| | 60 | | } |