Modify documentation of APIs
[platform/core/csapi/maps.git] / Tizen.Maps / Tizen.Maps / PlaceAddress.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18
19 namespace Tizen.Maps
20 {
21     /// <summary>
22     /// Address information for the map point used in Geocode and Reverse Geocode requests.
23     /// </summary>
24     public class PlaceAddress : IDisposable
25     {
26         internal Interop.AddressHandle handle;
27
28         /// <summary>
29         /// Constructs map address object.
30         /// </summary>
31         /// <exception cref="System.InvalidOperationException">Thrown when native operation failed to allocate memory.</exception>
32         public PlaceAddress()
33         {
34             handle = new Interop.AddressHandle();
35         }
36
37         internal PlaceAddress(Interop.AddressHandle nativeHandle)
38         {
39             handle = nativeHandle;
40         }
41
42         /// <summary>
43         /// Gets a building number for this address.
44         /// </summary>
45         public string Building
46         {
47             get
48             {
49                 return handle.Building;
50             }
51             set
52             {
53                 handle.Building = value;
54             }
55         }
56
57         /// <summary>
58         /// Gets a city name for this address.
59         /// </summary>
60         public string City
61         {
62             get
63             {
64                 return handle.City;
65             }
66             set
67             {
68                 handle.City = value;
69             }
70         }
71
72         /// <summary>
73         /// Gets a country name for this address.
74         /// </summary>
75         public string Country
76         {
77             get
78             {
79                 return handle.Country;
80             }
81             set
82             {
83                 handle.Country = value;
84             }
85         }
86
87         /// <summary>
88         /// Gets a country code for this address.
89         /// </summary>
90         public string CountryCode
91         {
92             get
93             {
94                 return handle.CountryCode;
95             }
96             set
97             {
98                 handle.CountryCode = value;
99             }
100         }
101
102         /// <summary>
103         /// Gets a county name for this address.
104         /// </summary>
105         public string County
106         {
107             get
108             {
109                 return handle.County;
110             }
111             set
112             {
113                 handle.County = value;
114             }
115         }
116
117         /// <summary>
118         /// Gets a district name for this address.
119         /// </summary>
120         public string District
121         {
122             get
123             {
124                 return handle.District;
125             }
126             set
127             {
128                 handle.District = value;
129             }
130         }
131
132         /// <summary>
133         /// Gets a free text associated with this address.
134         /// </summary>
135         public string Freetext
136         {
137             get
138             {
139                 return handle.Freetext;
140             }
141             set
142             {
143                 handle.Freetext = value;
144             }
145         }
146
147         /// <summary>
148         /// Gets a postal code for this address.
149         /// </summary>
150         public string PostalCode
151         {
152             get
153             {
154                 return handle.PostalCode;
155             }
156             set
157             {
158                 handle.PostalCode = value;
159             }
160         }
161
162         /// <summary>
163         /// Gets a state name for this address.
164         /// </summary>
165         public string State
166         {
167             get
168             {
169                 return handle.State;
170             }
171             set
172             {
173                 handle.State = value;
174             }
175         }
176
177         /// <summary>
178         /// Gets a street name for this address.
179         /// </summary>
180         public string Street
181         {
182             get
183             {
184                 return handle.Street;
185             }
186             set
187             {
188                 handle.Street = value;
189             }
190         }
191
192         /// <summary>
193         /// Returns a string that represents this object.
194         /// </summary>
195         public override string ToString()
196         {
197             return $"{Freetext}";
198         }
199
200         #region IDisposable Support
201         private bool _disposedValue = false;
202
203         protected virtual void Dispose(bool disposing)
204         {
205             if (!_disposedValue)
206             {
207                 handle.Dispose();
208                 _disposedValue = true;
209             }
210         }
211
212         /// <summary>
213         /// Releases all resources used by this object.
214         /// </summary>
215         public void Dispose()
216         {
217             Dispose(true);
218             GC.SuppressFinalize(this);
219         }
220         #endregion
221     }
222 }