|   |  | 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.Attestation | 
|   |  | 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; | 
|   | 0 | 23 |  |  | 
|   |  | 24 |  |     /// <summary> | 
|   | 0 | 25 |  |     /// Describes the interface for the per-tenant enclave service. | 
|   |  | 26 |  |     /// </summary> | 
|   |  | 27 |  |     public partial class AttestationClient : ServiceClient<AttestationClient>, IAttestationClient, IAzureClient | 
|   |  | 28 |  |     { | 
|   | 4 | 29 |  |         /// <summary> | 
|   | 0 | 30 |  |         /// The base URI of the service. | 
|   |  | 31 |  |         /// </summary> | 
|   | 32 | 32 |  |         internal string BaseUri {get; set;} | 
|   | 4 | 33 |  |  | 
|   | 4 | 34 |  |         /// <summary> | 
|   | 4 | 35 |  |         /// Gets or sets json serialization settings. | 
|   | 4 | 36 |  |         /// </summary> | 
|   | 18 | 37 |  |         public JsonSerializerSettings SerializationSettings { get; private set; } | 
|   | 4 | 38 |  |  | 
|   | 4 | 39 |  |         /// <summary> | 
|   |  | 40 |  |         /// Gets or sets json deserialization settings. | 
|   |  | 41 |  |         /// </summary> | 
|   | 34 | 42 |  |         public JsonSerializerSettings DeserializationSettings { get; private set; } | 
|   |  | 43 |  |  | 
|   |  | 44 |  |         /// <summary> | 
|   |  | 45 |  |         /// Credentials needed for the client to connect to Azure. | 
|   |  | 46 |  |         /// </summary> | 
|   | 64 | 47 |  |         public ServiceClientCredentials Credentials { get; private set; } | 
|   |  | 48 |  |  | 
|   |  | 49 |  |         /// <summary> | 
|   |  | 50 |  |         /// Client API version. | 
|   |  | 51 |  |         /// </summary> | 
|   | 40 | 52 |  |         public string ApiVersion { get; private set; } | 
|   |  | 53 |  |  | 
|   |  | 54 |  |         /// <summary> | 
|   |  | 55 |  |         /// The preferred language for the response. | 
|   |  | 56 |  |         /// </summary> | 
|   | 48 | 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> | 
|   | 48 | 70 |  |         public bool? GenerateClientRequestId { get; set; } | 
|   |  | 71 |  |  | 
|   |  | 72 |  |         /// <summary> | 
|   |  | 73 |  |         /// Gets the IPolicyOperations. | 
|   |  | 74 |  |         /// </summary> | 
|   | 16 | 75 |  |         public virtual IPolicyOperations Policy { get; private set; } | 
|   |  | 76 |  |  | 
|   |  | 77 |  |         /// <summary> | 
|   |  | 78 |  |         /// Gets the IPolicyCertificatesOperations. | 
|   |  | 79 |  |         /// </summary> | 
|   | 16 | 80 |  |         public virtual IPolicyCertificatesOperations PolicyCertificates { get; private set; } | 
|   |  | 81 |  |  | 
|   |  | 82 |  |         /// <summary> | 
|   |  | 83 |  |         /// Gets the ISigningCertificatesOperations. | 
|   |  | 84 |  |         /// </summary> | 
|   | 10 | 85 |  |         public virtual ISigningCertificatesOperations SigningCertificates { get; private set; } | 
|   |  | 86 |  |  | 
|   |  | 87 |  |         /// <summary> | 
|   |  | 88 |  |         /// Gets the IMetadataConfigurationOperations. | 
|   |  | 89 |  |         /// </summary> | 
|   | 10 | 90 |  |         public virtual IMetadataConfigurationOperations MetadataConfiguration { get; private set; } | 
|   |  | 91 |  |  | 
|   |  | 92 |  |         /// <summary> | 
|   |  | 93 |  |         /// Initializes a new instance of the AttestationClient class. | 
|   |  | 94 |  |         /// </summary> | 
|   |  | 95 |  |         /// <param name='httpClient'> | 
|   |  | 96 |  |         /// HttpClient to be used | 
|   |  | 97 |  |         /// </param> | 
|   |  | 98 |  |         /// <param name='disposeHttpClient'> | 
|   |  | 99 |  |         /// True: will dispose the provided httpClient on calling AttestationClient.Dispose(). False: will not dispose p | 
|   | 0 | 100 |  |         protected AttestationClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) | 
|   |  | 101 |  |         { | 
|   | 0 | 102 |  |             Initialize(); | 
|   | 0 | 103 |  |         } | 
|   |  | 104 |  |  | 
|   |  | 105 |  |         /// <summary> | 
|   |  | 106 |  |         /// Initializes a new instance of the AttestationClient class. | 
|   |  | 107 |  |         /// </summary> | 
|   |  | 108 |  |         /// <param name='handlers'> | 
|   |  | 109 |  |         /// Optional. The delegating handlers to add to the http client pipeline. | 
|   |  | 110 |  |         /// </param> | 
|   | 8 | 111 |  |         protected AttestationClient(params DelegatingHandler[] handlers) : base(handlers) | 
|   |  | 112 |  |         { | 
|   | 8 | 113 |  |             Initialize(); | 
|   | 8 | 114 |  |         } | 
|   |  | 115 |  |  | 
|   |  | 116 |  |         /// <summary> | 
|   |  | 117 |  |         /// Initializes a new instance of the AttestationClient class. | 
|   |  | 118 |  |         /// </summary> | 
|   |  | 119 |  |         /// <param name='rootHandler'> | 
|   |  | 120 |  |         /// Optional. The http client handler used to handle http transport. | 
|   |  | 121 |  |         /// </param> | 
|   |  | 122 |  |         /// <param name='handlers'> | 
|   |  | 123 |  |         /// Optional. The delegating handlers to add to the http client pipeline. | 
|   |  | 124 |  |         /// </param> | 
|   | 0 | 125 |  |         protected AttestationClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandl | 
|   |  | 126 |  |         { | 
|   | 0 | 127 |  |             Initialize(); | 
|   | 0 | 128 |  |         } | 
|   |  | 129 |  |  | 
|   |  | 130 |  |         /// <summary> | 
|   |  | 131 |  |         /// Initializes a new instance of the AttestationClient class. | 
|   |  | 132 |  |         /// </summary> | 
|   |  | 133 |  |         /// <param name='credentials'> | 
|   |  | 134 |  |         /// Required. Credentials needed for the client to connect to Azure. | 
|   |  | 135 |  |         /// </param> | 
|   |  | 136 |  |         /// <param name='handlers'> | 
|   |  | 137 |  |         /// Optional. The delegating handlers to add to the http client pipeline. | 
|   |  | 138 |  |         /// </param> | 
|   |  | 139 |  |         /// <exception cref="System.ArgumentNullException"> | 
|   |  | 140 |  |         /// Thrown when a required parameter is null | 
|   |  | 141 |  |         /// </exception> | 
|   | 8 | 142 |  |         public AttestationClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handl | 
|   |  | 143 |  |         { | 
|   | 8 | 144 |  |             if (credentials == null) | 
|   |  | 145 |  |             { | 
|   | 0 | 146 |  |                 throw new System.ArgumentNullException("credentials"); | 
|   |  | 147 |  |             } | 
|   | 8 | 148 |  |             Credentials = credentials; | 
|   | 8 | 149 |  |             if (Credentials != null) | 
|   |  | 150 |  |             { | 
|   | 8 | 151 |  |                 Credentials.InitializeServiceClient(this); | 
|   |  | 152 |  |             } | 
|   | 8 | 153 |  |         } | 
|   |  | 154 |  |  | 
|   |  | 155 |  |         /// <summary> | 
|   |  | 156 |  |         /// Initializes a new instance of the AttestationClient class. | 
|   |  | 157 |  |         /// </summary> | 
|   |  | 158 |  |         /// <param name='credentials'> | 
|   |  | 159 |  |         /// Required. Credentials needed for the client to connect to Azure. | 
|   |  | 160 |  |         /// </param> | 
|   |  | 161 |  |         /// <param name='httpClient'> | 
|   |  | 162 |  |         /// HttpClient to be used | 
|   |  | 163 |  |         /// </param> | 
|   |  | 164 |  |         /// <param name='disposeHttpClient'> | 
|   |  | 165 |  |         /// True: will dispose the provided httpClient on calling AttestationClient.Dispose(). False: will not dispose p | 
|   |  | 166 |  |         /// <exception cref="System.ArgumentNullException"> | 
|   |  | 167 |  |         /// Thrown when a required parameter is null | 
|   |  | 168 |  |         /// </exception> | 
|   | 0 | 169 |  |         public AttestationClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) :  | 
|   |  | 170 |  |         { | 
|   | 0 | 171 |  |             if (credentials == null) | 
|   |  | 172 |  |             { | 
|   | 0 | 173 |  |                 throw new System.ArgumentNullException("credentials"); | 
|   |  | 174 |  |             } | 
|   | 0 | 175 |  |             Credentials = credentials; | 
|   | 0 | 176 |  |             if (Credentials != null) | 
|   |  | 177 |  |             { | 
|   | 0 | 178 |  |                 Credentials.InitializeServiceClient(this); | 
|   |  | 179 |  |             } | 
|   | 0 | 180 |  |         } | 
|   |  | 181 |  |  | 
|   |  | 182 |  |         /// <summary> | 
|   |  | 183 |  |         /// Initializes a new instance of the AttestationClient class. | 
|   |  | 184 |  |         /// </summary> | 
|   |  | 185 |  |         /// <param name='credentials'> | 
|   |  | 186 |  |         /// Required. Credentials needed for the client to connect to Azure. | 
|   |  | 187 |  |         /// </param> | 
|   |  | 188 |  |         /// <param name='rootHandler'> | 
|   |  | 189 |  |         /// Optional. The http client handler used to handle http transport. | 
|   |  | 190 |  |         /// </param> | 
|   |  | 191 |  |         /// <param name='handlers'> | 
|   |  | 192 |  |         /// Optional. The delegating handlers to add to the http client pipeline. | 
|   |  | 193 |  |         /// </param> | 
|   |  | 194 |  |         /// <exception cref="System.ArgumentNullException"> | 
|   |  | 195 |  |         /// Thrown when a required parameter is null | 
|   |  | 196 |  |         /// </exception> | 
|   | 0 | 197 |  |         public AttestationClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingH | 
|   |  | 198 |  |         { | 
|   | 0 | 199 |  |             if (credentials == null) | 
|   |  | 200 |  |             { | 
|   | 0 | 201 |  |                 throw new System.ArgumentNullException("credentials"); | 
|   |  | 202 |  |             } | 
|   | 0 | 203 |  |             Credentials = credentials; | 
|   | 0 | 204 |  |             if (Credentials != null) | 
|   |  | 205 |  |             { | 
|   | 0 | 206 |  |                 Credentials.InitializeServiceClient(this); | 
|   |  | 207 |  |             } | 
|   | 0 | 208 |  |         } | 
|   |  | 209 |  |  | 
|   |  | 210 |  |         /// <summary> | 
|   |  | 211 |  |         /// An optional partial-method to perform custom initialization. | 
|   |  | 212 |  |         /// </summary> | 
|   |  | 213 |  |         partial void CustomInitialize(); | 
|   |  | 214 |  |         /// <summary> | 
|   |  | 215 |  |         /// Initializes client properties. | 
|   |  | 216 |  |         /// </summary> | 
|   |  | 217 |  |         private void Initialize() | 
|   |  | 218 |  |         { | 
|   | 8 | 219 |  |             Policy = new PolicyOperations(this); | 
|   | 8 | 220 |  |             PolicyCertificates = new PolicyCertificatesOperations(this); | 
|   | 8 | 221 |  |             SigningCertificates = new SigningCertificatesOperations(this); | 
|   | 8 | 222 |  |             MetadataConfiguration = new MetadataConfigurationOperations(this); | 
|   | 8 | 223 |  |             BaseUri = "{tenantBaseUrl}"; | 
|   | 8 | 224 |  |             ApiVersion = "2018-09-01-preview"; | 
|   | 8 | 225 |  |             AcceptLanguage = "en-US"; | 
|   | 8 | 226 |  |             LongRunningOperationRetryTimeout = 30; | 
|   | 8 | 227 |  |             GenerateClientRequestId = true; | 
|   | 8 | 228 |  |             SerializationSettings = new JsonSerializerSettings | 
|   | 8 | 229 |  |             { | 
|   | 8 | 230 |  |                 Formatting = Newtonsoft.Json.Formatting.Indented, | 
|   | 8 | 231 |  |                 DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, | 
|   | 8 | 232 |  |                 DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, | 
|   | 8 | 233 |  |                 NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, | 
|   | 8 | 234 |  |                 ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, | 
|   | 8 | 235 |  |                 ContractResolver = new ReadOnlyJsonContractResolver(), | 
|   | 8 | 236 |  |                 Converters = new List<JsonConverter> | 
|   | 8 | 237 |  |                     { | 
|   | 8 | 238 |  |                         new Iso8601TimeSpanConverter() | 
|   | 8 | 239 |  |                     } | 
|   | 8 | 240 |  |             }; | 
|   | 8 | 241 |  |             DeserializationSettings = new JsonSerializerSettings | 
|   | 8 | 242 |  |             { | 
|   | 8 | 243 |  |                 DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, | 
|   | 8 | 244 |  |                 DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, | 
|   | 8 | 245 |  |                 NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, | 
|   | 8 | 246 |  |                 ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, | 
|   | 8 | 247 |  |                 ContractResolver = new ReadOnlyJsonContractResolver(), | 
|   | 8 | 248 |  |                 Converters = new List<JsonConverter> | 
|   | 8 | 249 |  |                     { | 
|   | 8 | 250 |  |                         new Iso8601TimeSpanConverter() | 
|   | 8 | 251 |  |                     } | 
|   | 8 | 252 |  |             }; | 
|   | 8 | 253 |  |             CustomInitialize(); | 
|   | 8 | 254 |  |             DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); | 
|   | 8 | 255 |  |         } | 
|   |  | 256 |  |     } | 
|   |  | 257 |  | } |