Modify documentation of APIs
[platform/core/csapi/tizenfx.git] / src / Tizen.Maps / Tizen.Maps / PlaceReview.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     /// Place Review information, used in Place Discovery and Search requests
23     /// </summary>
24     public class PlaceReview
25     {
26         private DateTime _date;
27         private string _title;
28         private double _rating;
29         private string _description;
30         private string _language;
31         private PlaceMedia _media;
32         private PlaceLink _userLink;
33
34         internal PlaceReview(Interop.PlaceReviewHandle handle)
35         {
36             string date = handle.Date;
37             if (DateTime.TryParse(date, out _date) == false)
38             {
39                 Interop.ErrorCode.InvalidParameter.WarnIfFailed($"Wrong date format: {date}");
40             }
41
42             _title = handle.Title;
43             _rating = handle.Rating;
44             _description = handle.Description;
45             _language = handle.Language;
46             _media = new PlaceMedia(handle.Media);
47             _userLink = new PlaceLink(handle.User);
48         }
49
50         /// <summary>
51         /// Gets an instance of <see cref="DateTime"/> object which representing time of this review.
52         /// </summary>
53         public DateTime Date { get { return _date; } }
54
55         /// <summary>
56         /// Gets a string which representing title of this review.
57         /// </summary>
58         public string Title { get { return _title; } }
59
60         /// <summary>
61         /// Gets a value which representing rating of this review.
62         /// </summary>
63         public double Rating { get { return _rating; } }
64
65         /// <summary>
66         /// Gets a string which representing description of this review.
67         /// </summary>
68         public string Description { get { return _description; } }
69
70         /// <summary>
71         /// Gets a string which representing language of this review.
72         /// </summary>
73         public string Language { get { return _language; } }
74
75         /// <summary>
76         /// Gets an instance of <see cref="PlaceMedia"/> object which representing review media of this review.
77         /// </summary>
78         public PlaceMedia ReviewMedia { get { return _media; } }
79
80         /// <summary>
81         /// Gets an instance of <see cref="PlaceLink"/> object which representing user link of this review.
82         /// </summary>
83         public PlaceLink UserLink { get { return _userLink; } }
84     }
85 }