2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 /// Place Review information, used in Place Discovery and Search requests
24 /// <since_tizen>3</since_tizen>
25 public class PlaceReview
27 private DateTime _date;
28 private string _title;
29 private double _rating;
30 private string _description;
31 private string _language;
32 private PlaceMedia _media;
33 private PlaceLink _userLink;
35 internal PlaceReview(Interop.PlaceReviewHandle handle)
37 string date = handle.Date;
38 if (DateTime.TryParse(date, out _date) == false)
40 Interop.ErrorCode.InvalidParameter.WarnIfFailed($"Wrong date format: {date}");
43 _title = handle.Title;
44 _rating = handle.Rating;
45 _description = handle.Description;
46 _language = handle.Language;
47 _media = new PlaceMedia(handle.Media);
48 _userLink = new PlaceLink(handle.User);
52 /// Gets an instance of <see cref="DateTime"/> object which representing time of this review.
54 /// <since_tizen>3</since_tizen>
55 public DateTime Date { get { return _date; } }
58 /// Gets a string which representing title of this review.
60 /// <since_tizen>3</since_tizen>
61 public string Title { get { return _title; } }
64 /// Gets a value which representing rating of this review.
66 /// <since_tizen>3</since_tizen>
67 public double Rating { get { return _rating; } }
70 /// Gets a string which representing description of this review.
72 /// <since_tizen>3</since_tizen>
73 public string Description { get { return _description; } }
76 /// Gets a string which representing language of this review.
78 /// <since_tizen>3</since_tizen>
79 public string Language { get { return _language; } }
82 /// Gets an instance of <see cref="PlaceMedia"/> object which representing review media of this review.
84 /// <since_tizen>3</since_tizen>
85 public PlaceMedia ReviewMedia { get { return _media; } }
88 /// Gets an instance of <see cref="PlaceLink"/> object which representing user link of this review.
90 /// <since_tizen>3</since_tizen>
91 public PlaceLink UserLink { get { return _userLink; } }