| | 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.LocalSearch.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="readLink">The URL that returns this resource.</param> |
| | 32 | | /// <param name="webSearchUrl">The URL to Bing's search result for this |
| | 33 | | /// item.</param> |
| | 34 | | /// <param name="name">The name of the thing represented by this |
| | 35 | | /// object.</param> |
| | 36 | | /// <param name="url">The URL to get more information about the thing |
| | 37 | | /// represented by this object.</param> |
| | 38 | | /// <param name="entityPresentationInfo">Additional information about |
| | 39 | | /// the entity such as hints that you can use to determine the entity's |
| | 40 | | /// type. To determine the entity's type, use the entityScenario and |
| | 41 | | /// entityTypeHint fields.</param> |
| | 42 | | /// <param name="addressLocality">The city where the street address is |
| | 43 | | /// located. For example, Seattle.</param> |
| | 44 | | /// <param name="addressRegion">The state or province code where the |
| | 45 | | /// street address is located. This could be the two-letter code. For |
| | 46 | | /// example, WA, or the full name , Washington.</param> |
| | 47 | | /// <param name="postalCode">The zip code or postal code where the |
| | 48 | | /// street address is located. For example, 98052.</param> |
| | 49 | | /// <param name="addressCountry">The country/region where the street |
| | 50 | | /// address is located. This could be the two-letter ISO code. For |
| | 51 | | /// example, US, or the full name, United States.</param> |
| | 52 | | /// <param name="countryIso">The two letter ISO code of this countr. |
| | 53 | | /// For example, US.</param> |
| | 54 | | /// <param name="neighborhood">The neighborhood where the street |
| | 55 | | /// address is located. For example, Westlake.</param> |
| | 56 | | /// <param name="addressRegionAbbreviation">Region Abbreviation. For |
| | 57 | | /// example, WA.</param> |
| | 58 | | /// <param name="text">The complete address. For example, 2100 Westlake |
| | 59 | | /// Ave N, Bellevue, WA 98052.</param> |
| | 60 | | public PostalAddress(string id = default(string), string readLink = default(string), string webSearchUrl = defau |
| 0 | 61 | | : base(id, readLink, webSearchUrl, potentialAction, immediateAction, preferredClickthroughUrl, adaptiveCard, |
| | 62 | | { |
| 0 | 63 | | StreetAddress = streetAddress; |
| 0 | 64 | | AddressLocality = addressLocality; |
| 0 | 65 | | AddressSubregion = addressSubregion; |
| 0 | 66 | | AddressRegion = addressRegion; |
| 0 | 67 | | PostalCode = postalCode; |
| 0 | 68 | | PostOfficeBoxNumber = postOfficeBoxNumber; |
| 0 | 69 | | AddressCountry = addressCountry; |
| 0 | 70 | | CountryIso = countryIso; |
| 0 | 71 | | Neighborhood = neighborhood; |
| 0 | 72 | | AddressRegionAbbreviation = addressRegionAbbreviation; |
| 0 | 73 | | Text = text; |
| 0 | 74 | | HouseNumber = houseNumber; |
| 0 | 75 | | StreetName = streetName; |
| 0 | 76 | | FormattingRuleId = formattingRuleId; |
| | 77 | | CustomInit(); |
| 0 | 78 | | } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// An initialization method that performs custom operations like setting defaults |
| | 82 | | /// </summary> |
| | 83 | | partial void CustomInit(); |
| | 84 | |
|
| | 85 | | /// <summary> |
| | 86 | | /// </summary> |
| | 87 | | [JsonProperty(PropertyName = "streetAddress")] |
| 0 | 88 | | public string StreetAddress { get; private set; } |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// Gets the city where the street address is located. For example, |
| | 92 | | /// Seattle. |
| | 93 | | /// </summary> |
| | 94 | | [JsonProperty(PropertyName = "addressLocality")] |
| 0 | 95 | | public string AddressLocality { get; private set; } |
| | 96 | |
|
| | 97 | | /// <summary> |
| | 98 | | /// </summary> |
| | 99 | | [JsonProperty(PropertyName = "addressSubregion")] |
| 0 | 100 | | public string AddressSubregion { get; private set; } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Gets the state or province code where the street address is |
| | 104 | | /// located. This could be the two-letter code. For example, WA, or the |
| | 105 | | /// full name , Washington. |
| | 106 | | /// </summary> |
| | 107 | | [JsonProperty(PropertyName = "addressRegion")] |
| 0 | 108 | | public string AddressRegion { get; private set; } |
| | 109 | |
|
| | 110 | | /// <summary> |
| | 111 | | /// Gets the zip code or postal code where the street address is |
| | 112 | | /// located. For example, 98052. |
| | 113 | | /// </summary> |
| | 114 | | [JsonProperty(PropertyName = "postalCode")] |
| 0 | 115 | | public string PostalCode { get; private set; } |
| | 116 | |
|
| | 117 | | /// <summary> |
| | 118 | | /// </summary> |
| | 119 | | [JsonProperty(PropertyName = "postOfficeBoxNumber")] |
| 0 | 120 | | public string PostOfficeBoxNumber { get; private set; } |
| | 121 | |
|
| | 122 | | /// <summary> |
| | 123 | | /// Gets the country/region where the street address is located. This |
| | 124 | | /// could be the two-letter ISO code. For example, US, or the full |
| | 125 | | /// name, United States. |
| | 126 | | /// </summary> |
| | 127 | | [JsonProperty(PropertyName = "addressCountry")] |
| 0 | 128 | | public string AddressCountry { get; private set; } |
| | 129 | |
|
| | 130 | | /// <summary> |
| | 131 | | /// Gets the two letter ISO code of this countr. For example, US. |
| | 132 | | /// </summary> |
| | 133 | | [JsonProperty(PropertyName = "countryIso")] |
| 0 | 134 | | public string CountryIso { get; private set; } |
| | 135 | |
|
| | 136 | | /// <summary> |
| | 137 | | /// Gets the neighborhood where the street address is located. For |
| | 138 | | /// example, Westlake. |
| | 139 | | /// </summary> |
| | 140 | | [JsonProperty(PropertyName = "neighborhood")] |
| 0 | 141 | | public string Neighborhood { get; private set; } |
| | 142 | |
|
| | 143 | | /// <summary> |
| | 144 | | /// Gets region Abbreviation. For example, WA. |
| | 145 | | /// </summary> |
| | 146 | | [JsonProperty(PropertyName = "addressRegionAbbreviation")] |
| 0 | 147 | | public string AddressRegionAbbreviation { get; private set; } |
| | 148 | |
|
| | 149 | | /// <summary> |
| | 150 | | /// Gets the complete address. For example, 2100 Westlake Ave N, |
| | 151 | | /// Bellevue, WA 98052. |
| | 152 | | /// </summary> |
| | 153 | | [JsonProperty(PropertyName = "text")] |
| 0 | 154 | | public string Text { get; private set; } |
| | 155 | |
|
| | 156 | | /// <summary> |
| | 157 | | /// </summary> |
| | 158 | | [JsonProperty(PropertyName = "houseNumber")] |
| 0 | 159 | | public string HouseNumber { get; private set; } |
| | 160 | |
|
| | 161 | | /// <summary> |
| | 162 | | /// </summary> |
| | 163 | | [JsonProperty(PropertyName = "streetName")] |
| 0 | 164 | | public string StreetName { get; private set; } |
| | 165 | |
|
| | 166 | | /// <summary> |
| | 167 | | /// </summary> |
| | 168 | | [JsonProperty(PropertyName = "formattingRuleId")] |
| 0 | 169 | | public string FormattingRuleId { get; private set; } |
| | 170 | |
|
| | 171 | | /// <summary> |
| | 172 | | /// Validate the object. |
| | 173 | | /// </summary> |
| | 174 | | /// <exception cref="Rest.ValidationException"> |
| | 175 | | /// Thrown if validation fails |
| | 176 | | /// </exception> |
| | 177 | | public override void Validate() |
| | 178 | | { |
| 0 | 179 | | base.Validate(); |
| 0 | 180 | | } |
| | 181 | | } |
| | 182 | | } |