| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Microsoft.Rest.Serialization; |
| | 15 | | using Models; |
| | 16 | | using Newtonsoft.Json; |
| | 17 | | using System.Collections; |
| | 18 | | using System.Collections.Generic; |
| | 19 | | using System.Net; |
| | 20 | | using System.Net.Http; |
| | 21 | |
|
| | 22 | | public partial class LUISAuthoringClient : ServiceClient<LUISAuthoringClient>, ILUISAuthoringClient |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// The base URI of the service. |
| | 26 | | /// </summary> |
| 745 | 27 | | internal string BaseUri {get; set;} |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Gets or sets json serialization settings. |
| | 31 | | /// </summary> |
| 1410 | 32 | | public JsonSerializerSettings SerializationSettings { get; private set; } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// Gets or sets json deserialization settings. |
| | 36 | | /// </summary> |
| 743 | 37 | | public JsonSerializerSettings DeserializationSettings { get; private set; } |
| | 38 | |
|
| | 39 | | /// <summary> |
| | 40 | | /// Supported Cognitive Services endpoints (protocol and hostname, for example: |
| | 41 | | /// https://westus.api.cognitive.microsoft.com). |
| | 42 | | /// </summary> |
| 1334 | 43 | | public string Endpoint { get; set; } |
| | 44 | |
|
| | 45 | | /// <summary> |
| | 46 | | /// Subscription credentials which uniquely identify client subscription. |
| | 47 | | /// </summary> |
| 1646 | 48 | | public ServiceClientCredentials Credentials { get; private set; } |
| | 49 | |
|
| | 50 | | /// <summary> |
| | 51 | | /// Gets the IFeatures. |
| | 52 | | /// </summary> |
| 192 | 53 | | public virtual IFeatures Features { get; private set; } |
| | 54 | |
|
| | 55 | | /// <summary> |
| | 56 | | /// Gets the IExamples. |
| | 57 | | /// </summary> |
| 166 | 58 | | public virtual IExamples Examples { get; private set; } |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// Gets the IModel. |
| | 62 | | /// </summary> |
| 539 | 63 | | public virtual IModel Model { get; private set; } |
| | 64 | |
|
| | 65 | | /// <summary> |
| | 66 | | /// Gets the IApps. |
| | 67 | | /// </summary> |
| 245 | 68 | | public virtual IApps Apps { get; private set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets the IVersions. |
| | 72 | | /// </summary> |
| 195 | 73 | | public virtual IVersions Versions { get; private set; } |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// Gets the ITrain. |
| | 77 | | /// </summary> |
| 166 | 78 | | public virtual ITrain Train { get; private set; } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Gets the IPattern. |
| | 82 | | /// </summary> |
| 178 | 83 | | public virtual IPattern Pattern { get; private set; } |
| | 84 | |
|
| | 85 | | /// <summary> |
| | 86 | | /// Gets the ISettings. |
| | 87 | | /// </summary> |
| 0 | 88 | | public virtual ISettings Settings { get; private set; } |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// Gets the IAzureAccounts. |
| | 92 | | /// </summary> |
| 0 | 93 | | public virtual IAzureAccounts AzureAccounts { get; private set; } |
| | 94 | |
|
| | 95 | | /// <summary> |
| | 96 | | /// Initializes a new instance of the LUISAuthoringClient class. |
| | 97 | | /// </summary> |
| | 98 | | /// <param name='httpClient'> |
| | 99 | | /// HttpClient to be used |
| | 100 | | /// </param> |
| | 101 | | /// <param name='disposeHttpClient'> |
| | 102 | | /// True: will dispose the provided httpClient on calling LUISAuthoringClient.Dispose(). False: will not dispose |
| 0 | 103 | | protected LUISAuthoringClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClien |
| | 104 | | { |
| 0 | 105 | | Initialize(); |
| 0 | 106 | | } |
| | 107 | |
|
| | 108 | | /// <summary> |
| | 109 | | /// Initializes a new instance of the LUISAuthoringClient class. |
| | 110 | | /// </summary> |
| | 111 | | /// <param name='handlers'> |
| | 112 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | 113 | | /// </param> |
| 156 | 114 | | protected LUISAuthoringClient(params DelegatingHandler[] handlers) : base(handlers) |
| | 115 | | { |
| 156 | 116 | | Initialize(); |
| 156 | 117 | | } |
| | 118 | |
|
| | 119 | | /// <summary> |
| | 120 | | /// Initializes a new instance of the LUISAuthoringClient class. |
| | 121 | | /// </summary> |
| | 122 | | /// <param name='rootHandler'> |
| | 123 | | /// Optional. The http client handler used to handle http transport. |
| | 124 | | /// </param> |
| | 125 | | /// <param name='handlers'> |
| | 126 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | 127 | | /// </param> |
| 0 | 128 | | protected LUISAuthoringClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHan |
| | 129 | | { |
| 0 | 130 | | Initialize(); |
| 0 | 131 | | } |
| | 132 | |
|
| | 133 | | /// <summary> |
| | 134 | | /// Initializes a new instance of the LUISAuthoringClient class. |
| | 135 | | /// </summary> |
| | 136 | | /// <param name='credentials'> |
| | 137 | | /// Required. Subscription credentials which uniquely identify client subscription. |
| | 138 | | /// </param> |
| | 139 | | /// <param name='handlers'> |
| | 140 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | 141 | | /// </param> |
| | 142 | | /// <exception cref="System.ArgumentNullException"> |
| | 143 | | /// Thrown when a required parameter is null |
| | 144 | | /// </exception> |
| 156 | 145 | | public LUISAuthoringClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(han |
| | 146 | | { |
| 156 | 147 | | if (credentials == null) |
| | 148 | | { |
| 0 | 149 | | throw new System.ArgumentNullException("credentials"); |
| | 150 | | } |
| 156 | 151 | | Credentials = credentials; |
| 156 | 152 | | if (Credentials != null) |
| | 153 | | { |
| 156 | 154 | | Credentials.InitializeServiceClient(this); |
| | 155 | | } |
| 156 | 156 | | } |
| | 157 | |
|
| | 158 | | /// <summary> |
| | 159 | | /// Initializes a new instance of the LUISAuthoringClient class. |
| | 160 | | /// </summary> |
| | 161 | | /// <param name='credentials'> |
| | 162 | | /// Required. Subscription credentials which uniquely identify client subscription. |
| | 163 | | /// </param> |
| | 164 | | /// <param name='httpClient'> |
| | 165 | | /// HttpClient to be used |
| | 166 | | /// </param> |
| | 167 | | /// <param name='disposeHttpClient'> |
| | 168 | | /// True: will dispose the provided httpClient on calling LUISAuthoringClient.Dispose(). False: will not dispose |
| | 169 | | /// <exception cref="System.ArgumentNullException"> |
| | 170 | | /// Thrown when a required parameter is null |
| | 171 | | /// </exception> |
| 0 | 172 | | public LUISAuthoringClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) |
| | 173 | | { |
| 0 | 174 | | if (credentials == null) |
| | 175 | | { |
| 0 | 176 | | throw new System.ArgumentNullException("credentials"); |
| | 177 | | } |
| 0 | 178 | | Credentials = credentials; |
| 0 | 179 | | if (Credentials != null) |
| | 180 | | { |
| 0 | 181 | | Credentials.InitializeServiceClient(this); |
| | 182 | | } |
| 0 | 183 | | } |
| | 184 | |
|
| | 185 | | /// <summary> |
| | 186 | | /// Initializes a new instance of the LUISAuthoringClient class. |
| | 187 | | /// </summary> |
| | 188 | | /// <param name='credentials'> |
| | 189 | | /// Required. Subscription credentials which uniquely identify client subscription. |
| | 190 | | /// </param> |
| | 191 | | /// <param name='rootHandler'> |
| | 192 | | /// Optional. The http client handler used to handle http transport. |
| | 193 | | /// </param> |
| | 194 | | /// <param name='handlers'> |
| | 195 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | 196 | | /// </param> |
| | 197 | | /// <exception cref="System.ArgumentNullException"> |
| | 198 | | /// Thrown when a required parameter is null |
| | 199 | | /// </exception> |
| 0 | 200 | | public LUISAuthoringClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params Delegatin |
| | 201 | | { |
| 0 | 202 | | if (credentials == null) |
| | 203 | | { |
| 0 | 204 | | throw new System.ArgumentNullException("credentials"); |
| | 205 | | } |
| 0 | 206 | | Credentials = credentials; |
| 0 | 207 | | if (Credentials != null) |
| | 208 | | { |
| 0 | 209 | | Credentials.InitializeServiceClient(this); |
| | 210 | | } |
| 0 | 211 | | } |
| | 212 | |
|
| | 213 | | /// <summary> |
| | 214 | | /// An optional partial-method to perform custom initialization. |
| | 215 | | ///</summary> |
| | 216 | | partial void CustomInitialize(); |
| | 217 | | /// <summary> |
| | 218 | | /// Initializes client properties. |
| | 219 | | /// </summary> |
| | 220 | | private void Initialize() |
| | 221 | | { |
| 156 | 222 | | Features = new Features(this); |
| 156 | 223 | | Examples = new Examples(this); |
| 156 | 224 | | Model = new Model(this); |
| 156 | 225 | | Apps = new Apps(this); |
| 156 | 226 | | Versions = new Versions(this); |
| 156 | 227 | | Train = new Train(this); |
| 156 | 228 | | Pattern = new Pattern(this); |
| 156 | 229 | | Settings = new Settings(this); |
| 156 | 230 | | AzureAccounts = new AzureAccounts(this); |
| 156 | 231 | | BaseUri = "{Endpoint}/luis/authoring/v3.0-preview"; |
| 156 | 232 | | SerializationSettings = new JsonSerializerSettings |
| 156 | 233 | | { |
| 156 | 234 | | Formatting = Newtonsoft.Json.Formatting.Indented, |
| 156 | 235 | | DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, |
| 156 | 236 | | DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, |
| 156 | 237 | | NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, |
| 156 | 238 | | ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, |
| 156 | 239 | | ContractResolver = new ReadOnlyJsonContractResolver(), |
| 156 | 240 | | Converters = new List<JsonConverter> |
| 156 | 241 | | { |
| 156 | 242 | | new Iso8601TimeSpanConverter() |
| 156 | 243 | | } |
| 156 | 244 | | }; |
| 156 | 245 | | DeserializationSettings = new JsonSerializerSettings |
| 156 | 246 | | { |
| 156 | 247 | | DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, |
| 156 | 248 | | DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, |
| 156 | 249 | | NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, |
| 156 | 250 | | ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, |
| 156 | 251 | | ContractResolver = new ReadOnlyJsonContractResolver(), |
| 156 | 252 | | Converters = new List<JsonConverter> |
| 156 | 253 | | { |
| 156 | 254 | | new Iso8601TimeSpanConverter() |
| 156 | 255 | | } |
| 156 | 256 | | }; |
| | 257 | | CustomInitialize(); |
| 156 | 258 | | } |
| | 259 | | } |
| | 260 | | } |