1 | <?php |
||
22 | class Url extends Resource |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | public $kind = 'urlshortener#url'; |
||
28 | |||
29 | /** |
||
30 | * Short URL, e.g. "http://goo.gl/l6MS". |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | public $id; |
||
35 | |||
36 | /** |
||
37 | * Long URL, e.g. "http://www.google.com/". |
||
38 | * Might not be present if the status is "REMOVED". |
||
39 | * |
||
40 | * @var string|null |
||
41 | */ |
||
42 | public $longUrl; |
||
43 | |||
44 | /** |
||
45 | * Status of the target URL. |
||
46 | * |
||
47 | * Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". |
||
48 | * A URL might be marked "REMOVED" if it was flagged as spam, for example. |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | public $status; |
||
53 | |||
54 | /** |
||
55 | * Time the short URL was created; ISO 8601 representation using the |
||
56 | * yyyy-MM-dd'T'HH:mm:ss.SSSZZ format e.g. "2010-10-14T19:01:24.944+00:00". |
||
57 | * |
||
58 | * @var string|null |
||
59 | */ |
||
60 | public $created; |
||
61 | |||
62 | /** |
||
63 | * A summary of the click analytics for the short and long URL. |
||
64 | * Might not be present if not requested or currently unavailable. |
||
65 | * |
||
66 | * @var Analytics|null |
||
67 | */ |
||
68 | public $analytics; |
||
69 | |||
70 | /** |
||
71 | * @param \stdClass $json |
||
72 | */ |
||
73 | 3 | public function setAnalytics($json) |
|
77 | } |
||
78 |