| | 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.ContainerRegistry |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Microsoft.Rest.Azure; |
| | 15 | | using Microsoft.Rest.Serialization; |
| | 16 | | using Models; |
| | 17 | | using Newtonsoft.Json; |
| | 18 | | using System.Collections; |
| | 19 | | using System.Collections.Generic; |
| | 20 | | using System.Linq; |
| | 21 | | using System.Net; |
| | 22 | | using System.Net.Http; |
| | 23 | |
|
| | 24 | | /// <summary> |
| | 25 | | /// Metadata API definition for the Azure Container Registry runtime |
| | 26 | | /// </summary> |
| | 27 | | public partial class AzureContainerRegistryClient : ServiceClient<AzureContainerRegistryClient>, IAzureContainerRegi |
| | 28 | | { |
| | 29 | | /// <summary> |
| | 30 | | /// The base URI of the service. |
| | 31 | | /// </summary> |
| 234 | 32 | | internal string BaseUri {get; set;} |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// Gets or sets json serialization settings. |
| | 36 | | /// </summary> |
| 76 | 37 | | public JsonSerializerSettings SerializationSettings { get; private set; } |
| | 38 | |
|
| | 39 | | /// <summary> |
| | 40 | | /// Gets or sets json deserialization settings. |
| | 41 | | /// </summary> |
| 222 | 42 | | public JsonSerializerSettings DeserializationSettings { get; private set; } |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// Credentials needed for the client to connect to Azure. |
| | 46 | | /// </summary> |
| 408 | 47 | | public ServiceClientCredentials Credentials { get; private set; } |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// Registry login URL |
| | 51 | | /// </summary> |
| 348 | 52 | | public string LoginUri { get; set; } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// The preferred language for the response. |
| | 56 | | /// </summary> |
| 288 | 57 | | public string AcceptLanguage { get; set; } |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// The retry timeout in seconds for Long Running Operations. Default value is |
| | 61 | | /// 30. |
| | 62 | | /// </summary> |
| 0 | 63 | | public int? LongRunningOperationRetryTimeout { get; set; } |
| | 64 | |
|
| | 65 | | /// <summary> |
| | 66 | | /// Whether a unique x-ms-client-request-id should be generated. When set to |
| | 67 | | /// true a unique x-ms-client-request-id value is generated and included in |
| | 68 | | /// each request. Default is true. |
| | 69 | | /// </summary> |
| 288 | 70 | | public bool? GenerateClientRequestId { get; set; } |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets the IV2SupportOperations. |
| | 74 | | /// </summary> |
| 0 | 75 | | public virtual IV2SupportOperations V2Support { get; private set; } |
| | 76 | |
|
| | 77 | | /// <summary> |
| | 78 | | /// Gets the IManifestsOperations. |
| | 79 | | /// </summary> |
| 88 | 80 | | public virtual IManifestsOperations Manifests { get; private set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets the IBlobOperations. |
| | 84 | | /// </summary> |
| 100 | 85 | | public virtual IBlobOperations Blob { get; private set; } |
| | 86 | |
|
| | 87 | | /// <summary> |
| | 88 | | /// Gets the IRepositoryOperations. |
| | 89 | | /// </summary> |
| 76 | 90 | | public virtual IRepositoryOperations Repository { get; private set; } |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// Gets the ITagOperations. |
| | 94 | | /// </summary> |
| 82 | 95 | | public virtual ITagOperations Tag { get; private set; } |
| | 96 | |
|
| | 97 | | /// <summary> |
| | 98 | | /// Gets the IRefreshTokensOperations. |
| | 99 | | /// </summary> |
| 64 | 100 | | public virtual IRefreshTokensOperations RefreshTokens { get; private set; } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Gets the IAccessTokensOperations. |
| | 104 | | /// </summary> |
| 64 | 105 | | public virtual IAccessTokensOperations AccessTokens { get; private set; } |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// Initializes a new instance of the AzureContainerRegistryClient class. |
| | 109 | | /// </summary> |
| | 110 | | /// <param name='httpClient'> |
| | 111 | | /// HttpClient to be used |
| | 112 | | /// </param> |
| | 113 | | /// <param name='disposeHttpClient'> |
| | 114 | | /// True: will dispose the provided httpClient on calling AzureContainerRegistryClient.Dispose(). False: will no |
| 0 | 115 | | protected AzureContainerRegistryClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, dispose |
| | 116 | | { |
| 0 | 117 | | Initialize(); |
| 0 | 118 | | } |
| | 119 | |
|
| | 120 | | /// <summary> |
| | 121 | | /// Initializes a new instance of the AzureContainerRegistryClient class. |
| | 122 | | /// </summary> |
| | 123 | | /// <param name='handlers'> |
| | 124 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | 125 | | /// </param> |
| 60 | 126 | | protected AzureContainerRegistryClient(params DelegatingHandler[] handlers) : base(handlers) |
| | 127 | | { |
| 60 | 128 | | Initialize(); |
| 60 | 129 | | } |
| | 130 | |
|
| | 131 | | /// <summary> |
| | 132 | | /// Initializes a new instance of the AzureContainerRegistryClient class. |
| | 133 | | /// </summary> |
| | 134 | | /// <param name='rootHandler'> |
| | 135 | | /// Optional. The http client handler used to handle http transport. |
| | 136 | | /// </param> |
| | 137 | | /// <param name='handlers'> |
| | 138 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | 139 | | /// </param> |
| 0 | 140 | | protected AzureContainerRegistryClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : bas |
| | 141 | | { |
| 0 | 142 | | Initialize(); |
| 0 | 143 | | } |
| | 144 | |
|
| | 145 | | /// <summary> |
| | 146 | | /// Initializes a new instance of the AzureContainerRegistryClient class. |
| | 147 | | /// </summary> |
| | 148 | | /// <param name='credentials'> |
| | 149 | | /// Required. Credentials needed for the client to connect to Azure. |
| | 150 | | /// </param> |
| | 151 | | /// <param name='handlers'> |
| | 152 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | 153 | | /// </param> |
| | 154 | | /// <exception cref="System.ArgumentNullException"> |
| | 155 | | /// Thrown when a required parameter is null |
| | 156 | | /// </exception> |
| 0 | 157 | | public AzureContainerRegistryClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : |
| | 158 | | { |
| 0 | 159 | | if (credentials == null) |
| | 160 | | { |
| 0 | 161 | | throw new System.ArgumentNullException("credentials"); |
| | 162 | | } |
| 0 | 163 | | Credentials = credentials; |
| 0 | 164 | | if (Credentials != null) |
| | 165 | | { |
| 0 | 166 | | Credentials.InitializeServiceClient(this); |
| | 167 | | } |
| 0 | 168 | | } |
| | 169 | |
|
| | 170 | | /// <summary> |
| | 171 | | /// Initializes a new instance of the AzureContainerRegistryClient class. |
| | 172 | | /// </summary> |
| | 173 | | /// <param name='credentials'> |
| | 174 | | /// Required. Credentials needed for the client to connect to Azure. |
| | 175 | | /// </param> |
| | 176 | | /// <param name='httpClient'> |
| | 177 | | /// HttpClient to be used |
| | 178 | | /// </param> |
| | 179 | | /// <param name='disposeHttpClient'> |
| | 180 | | /// True: will dispose the provided httpClient on calling AzureContainerRegistryClient.Dispose(). False: will no |
| | 181 | | /// <exception cref="System.ArgumentNullException"> |
| | 182 | | /// Thrown when a required parameter is null |
| | 183 | | /// </exception> |
| 0 | 184 | | public AzureContainerRegistryClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHtt |
| | 185 | | { |
| 0 | 186 | | if (credentials == null) |
| | 187 | | { |
| 0 | 188 | | throw new System.ArgumentNullException("credentials"); |
| | 189 | | } |
| 0 | 190 | | Credentials = credentials; |
| 0 | 191 | | if (Credentials != null) |
| | 192 | | { |
| 0 | 193 | | Credentials.InitializeServiceClient(this); |
| | 194 | | } |
| 0 | 195 | | } |
| | 196 | |
|
| | 197 | | /// <summary> |
| | 198 | | /// Initializes a new instance of the AzureContainerRegistryClient class. |
| | 199 | | /// </summary> |
| | 200 | | /// <param name='credentials'> |
| | 201 | | /// Required. Credentials needed for the client to connect to Azure. |
| | 202 | | /// </param> |
| | 203 | | /// <param name='rootHandler'> |
| | 204 | | /// Optional. The http client handler used to handle http transport. |
| | 205 | | /// </param> |
| | 206 | | /// <param name='handlers'> |
| | 207 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | 208 | | /// </param> |
| | 209 | | /// <exception cref="System.ArgumentNullException"> |
| | 210 | | /// Thrown when a required parameter is null |
| | 211 | | /// </exception> |
| 0 | 212 | | public AzureContainerRegistryClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params |
| | 213 | | { |
| 0 | 214 | | if (credentials == null) |
| | 215 | | { |
| 0 | 216 | | throw new System.ArgumentNullException("credentials"); |
| | 217 | | } |
| 0 | 218 | | Credentials = credentials; |
| 0 | 219 | | if (Credentials != null) |
| | 220 | | { |
| 0 | 221 | | Credentials.InitializeServiceClient(this); |
| | 222 | | } |
| 0 | 223 | | } |
| | 224 | |
|
| | 225 | | /// <summary> |
| | 226 | | /// An optional partial-method to perform custom initialization. |
| | 227 | | /// </summary> |
| | 228 | | partial void CustomInitialize(); |
| | 229 | | /// <summary> |
| | 230 | | /// Initializes client properties. |
| | 231 | | /// </summary> |
| | 232 | | private void Initialize() |
| | 233 | | { |
| 60 | 234 | | V2Support = new V2SupportOperations(this); |
| 60 | 235 | | Manifests = new ManifestsOperations(this); |
| 60 | 236 | | Blob = new BlobOperations(this); |
| 60 | 237 | | Repository = new RepositoryOperations(this); |
| 60 | 238 | | Tag = new TagOperations(this); |
| 60 | 239 | | RefreshTokens = new RefreshTokensOperations(this); |
| 60 | 240 | | AccessTokens = new AccessTokensOperations(this); |
| 60 | 241 | | BaseUri = "{url}"; |
| 60 | 242 | | AcceptLanguage = "en-US"; |
| 60 | 243 | | LongRunningOperationRetryTimeout = 30; |
| 60 | 244 | | GenerateClientRequestId = true; |
| 60 | 245 | | SerializationSettings = new JsonSerializerSettings |
| 60 | 246 | | { |
| 60 | 247 | | Formatting = Newtonsoft.Json.Formatting.Indented, |
| 60 | 248 | | DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, |
| 60 | 249 | | DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, |
| 60 | 250 | | NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, |
| 60 | 251 | | ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, |
| 60 | 252 | | ContractResolver = new ReadOnlyJsonContractResolver(), |
| 60 | 253 | | Converters = new List<JsonConverter> |
| 60 | 254 | | { |
| 60 | 255 | | new Iso8601TimeSpanConverter() |
| 60 | 256 | | } |
| 60 | 257 | | }; |
| 60 | 258 | | DeserializationSettings = new JsonSerializerSettings |
| 60 | 259 | | { |
| 60 | 260 | | DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, |
| 60 | 261 | | DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, |
| 60 | 262 | | NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, |
| 60 | 263 | | ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, |
| 60 | 264 | | ContractResolver = new ReadOnlyJsonContractResolver(), |
| 60 | 265 | | Converters = new List<JsonConverter> |
| 60 | 266 | | { |
| 60 | 267 | | new Iso8601TimeSpanConverter() |
| 60 | 268 | | } |
| 60 | 269 | | }; |
| | 270 | | CustomInitialize(); |
| 60 | 271 | | DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); |
| 60 | 272 | | } |
| | 273 | | } |
| | 274 | | } |