| | 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 | |
|
| | 10 | | namespace Azure.Data.Tables.Models |
| | 11 | | { |
| | 12 | | /// <summary> CORS is an HTTP feature that enables a web application running under one domain to access resources in |
| | 13 | | public partial class TableCorsRule |
| | 14 | | { |
| | 15 | | /// <summary> Initializes a new instance of TableCorsRule. </summary> |
| | 16 | | /// <param name="allowedOrigins"> The origin domains that are permitted to make a request against the service vi |
| | 17 | | /// <param name="allowedMethods"> The methods (HTTP request verbs) that the origin domain may use for a CORS req |
| | 18 | | /// <param name="allowedHeaders"> The request headers that the origin domain may specify on the CORS request. </ |
| | 19 | | /// <param name="exposedHeaders"> The response headers that may be sent in the response to the CORS request and |
| | 20 | | /// <param name="maxAgeInSeconds"> The maximum amount time that a browser should cache the preflight OPTIONS req |
| | 21 | | /// <exception cref="ArgumentNullException"> <paramref name="allowedOrigins"/>, <paramref name="allowedMethods"/ |
| 0 | 22 | | public TableCorsRule(string allowedOrigins, string allowedMethods, string allowedHeaders, string exposedHeaders, |
| | 23 | | { |
| 0 | 24 | | if (allowedOrigins == null) |
| | 25 | | { |
| 0 | 26 | | throw new ArgumentNullException(nameof(allowedOrigins)); |
| | 27 | | } |
| 0 | 28 | | if (allowedMethods == null) |
| | 29 | | { |
| 0 | 30 | | throw new ArgumentNullException(nameof(allowedMethods)); |
| | 31 | | } |
| 0 | 32 | | if (allowedHeaders == null) |
| | 33 | | { |
| 0 | 34 | | throw new ArgumentNullException(nameof(allowedHeaders)); |
| | 35 | | } |
| 0 | 36 | | if (exposedHeaders == null) |
| | 37 | | { |
| 0 | 38 | | throw new ArgumentNullException(nameof(exposedHeaders)); |
| | 39 | | } |
| | 40 | |
|
| 0 | 41 | | AllowedOrigins = allowedOrigins; |
| 0 | 42 | | AllowedMethods = allowedMethods; |
| 0 | 43 | | AllowedHeaders = allowedHeaders; |
| 0 | 44 | | ExposedHeaders = exposedHeaders; |
| 0 | 45 | | MaxAgeInSeconds = maxAgeInSeconds; |
| 0 | 46 | | } |
| | 47 | |
|
| | 48 | | /// <summary> The origin domains that are permitted to make a request against the service via CORS. The origin d |
| 0 | 49 | | public string AllowedOrigins { get; set; } |
| | 50 | | /// <summary> The methods (HTTP request verbs) that the origin domain may use for a CORS request. (comma separat |
| 0 | 51 | | public string AllowedMethods { get; set; } |
| | 52 | | /// <summary> The request headers that the origin domain may specify on the CORS request. </summary> |
| 0 | 53 | | public string AllowedHeaders { get; set; } |
| | 54 | | /// <summary> The response headers that may be sent in the response to the CORS request and exposed by the brows |
| 0 | 55 | | public string ExposedHeaders { get; set; } |
| | 56 | | /// <summary> The maximum amount time that a browser should cache the preflight OPTIONS request. </summary> |
| 0 | 57 | | public int MaxAgeInSeconds { get; set; } |
| | 58 | | } |
| | 59 | | } |