1<?php
2/**
3 * Copyright 2017 Facebook, Inc.
4 *
5 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6 * use, copy, modify, and distribute this software in source code or binary
7 * form for use in connection with the web services and APIs provided by
8 * Facebook.
9 *
10 * As with any software that integrates with the Facebook platform, your use
11 * of this software is subject to the Facebook Developer Principles and
12 * Policies [http://developers.facebook.com/policy/]. This copyright notice
13 * shall be included in all copies or substantial portions of the software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 *
23 */
24namespace Facebook\GraphNodes;
25
26/**
27 * Class GraphGroup
28 *
29 * @package Facebook
30 */
31class GraphGroup extends GraphNode
32{
33    /**
34     * @var array Maps object key names to GraphNode types.
35     */
36    protected static $graphObjectMap = [
37        'cover' => '\Facebook\GraphNodes\GraphCoverPhoto',
38        'venue' => '\Facebook\GraphNodes\GraphLocation',
39    ];
40
41    /**
42     * Returns the `id` (The Group ID) as string if present.
43     *
44     * @return string|null
45     */
46    public function getId()
47    {
48        return $this->getField('id');
49    }
50
51    /**
52     * Returns the `cover` (The cover photo of the Group) as GraphCoverPhoto if present.
53     *
54     * @return GraphCoverPhoto|null
55     */
56    public function getCover()
57    {
58        return $this->getField('cover');
59    }
60
61    /**
62     * Returns the `description` (A brief description of the Group) as string if present.
63     *
64     * @return string|null
65     */
66    public function getDescription()
67    {
68        return $this->getField('description');
69    }
70
71    /**
72     * Returns the `email` (The email address to upload content to the Group. Only current members of the Group can use this) as string if present.
73     *
74     * @return string|null
75     */
76    public function getEmail()
77    {
78        return $this->getField('email');
79    }
80
81    /**
82     * Returns the `icon` (The URL for the Group's icon) as string if present.
83     *
84     * @return string|null
85     */
86    public function getIcon()
87    {
88        return $this->getField('icon');
89    }
90
91    /**
92     * Returns the `link` (The Group's website) as string if present.
93     *
94     * @return string|null
95     */
96    public function getLink()
97    {
98        return $this->getField('link');
99    }
100
101    /**
102     * Returns the `name` (The name of the Group) as string if present.
103     *
104     * @return string|null
105     */
106    public function getName()
107    {
108        return $this->getField('name');
109    }
110
111    /**
112     * Returns the `member_request_count` (Number of people asking to join the group.) as int if present.
113     *
114     * @return int|null
115     */
116    public function getMemberRequestCount()
117    {
118        return $this->getField('member_request_count');
119    }
120
121    /**
122     * Returns the `owner` (The profile that created this Group) as GraphNode if present.
123     *
124     * @return GraphNode|null
125     */
126    public function getOwner()
127    {
128        return $this->getField('owner');
129    }
130
131    /**
132     * Returns the `parent` (The parent Group of this Group, if it exists) as GraphNode if present.
133     *
134     * @return GraphNode|null
135     */
136    public function getParent()
137    {
138        return $this->getField('parent');
139    }
140
141    /**
142     * Returns the `privacy` (The privacy setting of the Group) as string if present.
143     *
144     * @return string|null
145     */
146    public function getPrivacy()
147    {
148        return $this->getField('privacy');
149    }
150
151    /**
152     * Returns the `updated_time` (The last time the Group was updated (this includes changes in the Group's properties and changes in posts and comments if user can see them)) as \DateTime if present.
153     *
154     * @return \DateTime|null
155     */
156    public function getUpdatedTime()
157    {
158        return $this->getField('updated_time');
159    }
160
161    /**
162     * Returns the `venue` (The location for the Group) as GraphLocation if present.
163     *
164     * @return GraphLocation|null
165     */
166    public function getVenue()
167    {
168        return $this->getField('venue');
169    }
170}
171