| | 1 | | // <auto-generated> |
| | 2 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 3 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 4 | | // regenerated. |
| | 5 | | // </auto-generated> |
| | 6 | |
|
| | 7 | | namespace Microsoft.Azure.CognitiveServices.Search.EntitySearch.Models |
| | 8 | | { |
| | 9 | | using Newtonsoft.Json; |
| | 10 | | using System.Collections; |
| | 11 | | using System.Collections.Generic; |
| | 12 | | using System.Linq; |
| | 13 | |
|
| | 14 | | /// <summary> |
| | 15 | | /// Defines a postal address. |
| | 16 | | /// </summary> |
| | 17 | | public partial class PostalAddress : StructuredValue |
| | 18 | | { |
| | 19 | | /// <summary> |
| | 20 | | /// Initializes a new instance of the PostalAddress class. |
| | 21 | | /// </summary> |
| 0 | 22 | | public PostalAddress() |
| | 23 | | { |
| | 24 | | CustomInit(); |
| 0 | 25 | | } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Initializes a new instance of the PostalAddress class. |
| | 29 | | /// </summary> |
| | 30 | | /// <param name="id">A String identifier.</param> |
| | 31 | | /// <param name="contractualRules">A list of rules that you must adhere |
| | 32 | | /// to if you display the item.</param> |
| | 33 | | /// <param name="webSearchUrl">The URL To Bing's search result for this |
| | 34 | | /// item.</param> |
| | 35 | | /// <param name="name">The name of the thing represented by this |
| | 36 | | /// object.</param> |
| | 37 | | /// <param name="url">The URL to get more information about the thing |
| | 38 | | /// represented by this object.</param> |
| | 39 | | /// <param name="description">A short description of the item.</param> |
| | 40 | | /// <param name="entityPresentationInfo">Additional information about |
| | 41 | | /// the entity such as hints that you can use to determine the entity's |
| | 42 | | /// type. To determine the entity's type, use the entityScenario and |
| | 43 | | /// entityTypeHint fields.</param> |
| | 44 | | /// <param name="bingId">An ID that uniquely identifies this |
| | 45 | | /// item.</param> |
| | 46 | | /// <param name="addressLocality">The city where the street address is |
| | 47 | | /// located. For example, Seattle.</param> |
| | 48 | | /// <param name="addressRegion">The state or province code where the |
| | 49 | | /// street address is located. This could be the two-letter code. For |
| | 50 | | /// example, WA, or the full name , Washington.</param> |
| | 51 | | /// <param name="postalCode">The zip code or postal code where the |
| | 52 | | /// street address is located. For example, 98052.</param> |
| | 53 | | /// <param name="addressCountry">The country/region where the street |
| | 54 | | /// address is located. This could be the two-letter ISO code. For |
| | 55 | | /// example, US, or the full name, United States.</param> |
| | 56 | | /// <param name="countryIso">The two letter ISO code of this countr. |
| | 57 | | /// For example, US.</param> |
| | 58 | | /// <param name="neighborhood">The neighborhood where the street |
| | 59 | | /// address is located. For example, Westlake.</param> |
| | 60 | | /// <param name="addressRegionAbbreviation">Region Abbreviation. For |
| | 61 | | /// example, WA.</param> |
| | 62 | | /// <param name="text">The complete address. For example, 2100 Westlake |
| | 63 | | /// Ave N, Bellevue, WA 98052.</param> |
| | 64 | | public PostalAddress(string id = default(string), IList<ContractualRulesContractualRule> contractualRules = defa |
| 0 | 65 | | : base(id, contractualRules, webSearchUrl, name, url, image, description, entityPresentationInfo, bingId) |
| | 66 | | { |
| 0 | 67 | | StreetAddress = streetAddress; |
| 0 | 68 | | AddressLocality = addressLocality; |
| 0 | 69 | | AddressSubregion = addressSubregion; |
| 0 | 70 | | AddressRegion = addressRegion; |
| 0 | 71 | | PostalCode = postalCode; |
| 0 | 72 | | PostOfficeBoxNumber = postOfficeBoxNumber; |
| 0 | 73 | | AddressCountry = addressCountry; |
| 0 | 74 | | CountryIso = countryIso; |
| 0 | 75 | | Neighborhood = neighborhood; |
| 0 | 76 | | AddressRegionAbbreviation = addressRegionAbbreviation; |
| 0 | 77 | | Text = text; |
| | 78 | | CustomInit(); |
| 0 | 79 | | } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// An initialization method that performs custom operations like setting defaults |
| | 83 | | /// </summary> |
| | 84 | | partial void CustomInit(); |
| | 85 | |
|
| | 86 | | /// <summary> |
| | 87 | | /// </summary> |
| | 88 | | [JsonProperty(PropertyName = "streetAddress")] |
| 0 | 89 | | public string StreetAddress { get; private set; } |
| | 90 | |
|
| | 91 | | /// <summary> |
| | 92 | | /// Gets the city where the street address is located. For example, |
| | 93 | | /// Seattle. |
| | 94 | | /// </summary> |
| | 95 | | [JsonProperty(PropertyName = "addressLocality")] |
| 0 | 96 | | public string AddressLocality { get; private set; } |
| | 97 | |
|
| | 98 | | /// <summary> |
| | 99 | | /// </summary> |
| | 100 | | [JsonProperty(PropertyName = "addressSubregion")] |
| 0 | 101 | | public string AddressSubregion { get; private set; } |
| | 102 | |
|
| | 103 | | /// <summary> |
| | 104 | | /// Gets the state or province code where the street address is |
| | 105 | | /// located. This could be the two-letter code. For example, WA, or the |
| | 106 | | /// full name , Washington. |
| | 107 | | /// </summary> |
| | 108 | | [JsonProperty(PropertyName = "addressRegion")] |
| 0 | 109 | | public string AddressRegion { get; private set; } |
| | 110 | |
|
| | 111 | | /// <summary> |
| | 112 | | /// Gets the zip code or postal code where the street address is |
| | 113 | | /// located. For example, 98052. |
| | 114 | | /// </summary> |
| | 115 | | [JsonProperty(PropertyName = "postalCode")] |
| 0 | 116 | | public string PostalCode { get; private set; } |
| | 117 | |
|
| | 118 | | /// <summary> |
| | 119 | | /// </summary> |
| | 120 | | [JsonProperty(PropertyName = "postOfficeBoxNumber")] |
| 0 | 121 | | public string PostOfficeBoxNumber { get; private set; } |
| | 122 | |
|
| | 123 | | /// <summary> |
| | 124 | | /// Gets the country/region where the street address is located. This |
| | 125 | | /// could be the two-letter ISO code. For example, US, or the full |
| | 126 | | /// name, United States. |
| | 127 | | /// </summary> |
| | 128 | | [JsonProperty(PropertyName = "addressCountry")] |
| 0 | 129 | | public string AddressCountry { get; private set; } |
| | 130 | |
|
| | 131 | | /// <summary> |
| | 132 | | /// Gets the two letter ISO code of this countr. For example, US. |
| | 133 | | /// </summary> |
| | 134 | | [JsonProperty(PropertyName = "countryIso")] |
| 0 | 135 | | public string CountryIso { get; private set; } |
| | 136 | |
|
| | 137 | | /// <summary> |
| | 138 | | /// Gets the neighborhood where the street address is located. For |
| | 139 | | /// example, Westlake. |
| | 140 | | /// </summary> |
| | 141 | | [JsonProperty(PropertyName = "neighborhood")] |
| 0 | 142 | | public string Neighborhood { get; private set; } |
| | 143 | |
|
| | 144 | | /// <summary> |
| | 145 | | /// Gets region Abbreviation. For example, WA. |
| | 146 | | /// </summary> |
| | 147 | | [JsonProperty(PropertyName = "addressRegionAbbreviation")] |
| 0 | 148 | | public string AddressRegionAbbreviation { get; private set; } |
| | 149 | |
|
| | 150 | | /// <summary> |
| | 151 | | /// Gets the complete address. For example, 2100 Westlake Ave N, |
| | 152 | | /// Bellevue, WA 98052. |
| | 153 | | /// </summary> |
| | 154 | | [JsonProperty(PropertyName = "text")] |
| 0 | 155 | | public string Text { get; private set; } |
| | 156 | |
|
| | 157 | | /// <summary> |
| | 158 | | /// Validate the object. |
| | 159 | | /// </summary> |
| | 160 | | /// <exception cref="Rest.ValidationException"> |
| | 161 | | /// Thrown if validation fails |
| | 162 | | /// </exception> |
| | 163 | | public override void Validate() |
| | 164 | | { |
| 0 | 165 | | base.Validate(); |
| 0 | 166 | | } |
| | 167 | | } |
| | 168 | | } |