Skip to content

Commit 655c946

Browse files
1 parent b52eac2 commit 655c946

3 files changed

Lines changed: 290 additions & 0 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\HangoutsChat;
19+
20+
class ForwardedMetadata extends \Google\Model
21+
{
22+
/**
23+
* Output only. The resource name of the source space. Format: spaces/{space}
24+
*
25+
* @var string
26+
*/
27+
public $space;
28+
/**
29+
* Output only. The display name of the source space or DM at the time of
30+
* forwarding. For `SPACE`, this is the space name. For `DIRECT_MESSAGE`, this
31+
* is the other participant's name (e.g., "User A"). For `GROUP_CHAT`, this is
32+
* a generated name based on members' first names, limited to 5 including the
33+
* creator (e.g., "User A, User B").
34+
*
35+
* @var string
36+
*/
37+
public $spaceDisplayName;
38+
39+
/**
40+
* Output only. The resource name of the source space. Format: spaces/{space}
41+
*
42+
* @param string $space
43+
*/
44+
public function setSpace($space)
45+
{
46+
$this->space = $space;
47+
}
48+
/**
49+
* @return string
50+
*/
51+
public function getSpace()
52+
{
53+
return $this->space;
54+
}
55+
/**
56+
* Output only. The display name of the source space or DM at the time of
57+
* forwarding. For `SPACE`, this is the space name. For `DIRECT_MESSAGE`, this
58+
* is the other participant's name (e.g., "User A"). For `GROUP_CHAT`, this is
59+
* a generated name based on members' first names, limited to 5 including the
60+
* creator (e.g., "User A, User B").
61+
*
62+
* @param string $spaceDisplayName
63+
*/
64+
public function setSpaceDisplayName($spaceDisplayName)
65+
{
66+
$this->spaceDisplayName = $spaceDisplayName;
67+
}
68+
/**
69+
* @return string
70+
*/
71+
public function getSpaceDisplayName()
72+
{
73+
return $this->spaceDisplayName;
74+
}
75+
}
76+
77+
// Adding a class alias for backwards compatibility with the previous class name.
78+
class_alias(ForwardedMetadata::class, 'Google_Service_HangoutsChat_ForwardedMetadata');

src/HangoutsChat/QuotedMessageMetadata.php

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919

2020
class QuotedMessageMetadata extends \Google\Model
2121
{
22+
/**
23+
* Reserved. This value is unused.
24+
*/
25+
public const QUOTE_TYPE_QUOTE_TYPE_UNSPECIFIED = 'QUOTE_TYPE_UNSPECIFIED';
26+
/**
27+
* If quote_type is `REPLY`, you can do the following: * If you're replying in
28+
* a thread, you can quote another message in that thread. * If you're
29+
* creating a root message, you can quote another root message in that space.
30+
* You can't quote a message reply from a different thread.
31+
*/
32+
public const QUOTE_TYPE_REPLY = 'REPLY';
33+
protected $forwardedMetadataType = ForwardedMetadata::class;
34+
protected $forwardedMetadataDataType = '';
2235
/**
2336
* Required. The timestamp when the quoted message was created or when the
2437
* quoted message was last updated. If the message was edited, use this field,
@@ -36,7 +49,33 @@ class QuotedMessageMetadata extends \Google\Model
3649
* @var string
3750
*/
3851
public $name;
52+
/**
53+
* Optional. Specifies the quote type. If not set, defaults to REPLY in the
54+
* message read/write path for backward compatibility.
55+
*
56+
* @var string
57+
*/
58+
public $quoteType;
59+
protected $quotedMessageSnapshotType = QuotedMessageSnapshot::class;
60+
protected $quotedMessageSnapshotDataType = '';
3961

62+
/**
63+
* Output only. Metadata about the source space of the quoted message.
64+
* Populated only for FORWARD quote type.
65+
*
66+
* @param ForwardedMetadata $forwardedMetadata
67+
*/
68+
public function setForwardedMetadata(ForwardedMetadata $forwardedMetadata)
69+
{
70+
$this->forwardedMetadata = $forwardedMetadata;
71+
}
72+
/**
73+
* @return ForwardedMetadata
74+
*/
75+
public function getForwardedMetadata()
76+
{
77+
return $this->forwardedMetadata;
78+
}
4079
/**
4180
* Required. The timestamp when the quoted message was created or when the
4281
* quoted message was last updated. If the message was edited, use this field,
@@ -74,6 +113,41 @@ public function getName()
74113
{
75114
return $this->name;
76115
}
116+
/**
117+
* Optional. Specifies the quote type. If not set, defaults to REPLY in the
118+
* message read/write path for backward compatibility.
119+
*
120+
* Accepted values: QUOTE_TYPE_UNSPECIFIED, REPLY
121+
*
122+
* @param self::QUOTE_TYPE_* $quoteType
123+
*/
124+
public function setQuoteType($quoteType)
125+
{
126+
$this->quoteType = $quoteType;
127+
}
128+
/**
129+
* @return self::QUOTE_TYPE_*
130+
*/
131+
public function getQuoteType()
132+
{
133+
return $this->quoteType;
134+
}
135+
/**
136+
* Output only. A snapshot of the quoted message's content.
137+
*
138+
* @param QuotedMessageSnapshot $quotedMessageSnapshot
139+
*/
140+
public function setQuotedMessageSnapshot(QuotedMessageSnapshot $quotedMessageSnapshot)
141+
{
142+
$this->quotedMessageSnapshot = $quotedMessageSnapshot;
143+
}
144+
/**
145+
* @return QuotedMessageSnapshot
146+
*/
147+
public function getQuotedMessageSnapshot()
148+
{
149+
return $this->quotedMessageSnapshot;
150+
}
77151
}
78152

79153
// Adding a class alias for backwards compatibility with the previous class name.
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\HangoutsChat;
19+
20+
class QuotedMessageSnapshot extends \Google\Collection
21+
{
22+
protected $collection_key = 'attachments';
23+
protected $annotationsType = Annotation::class;
24+
protected $annotationsDataType = 'array';
25+
protected $attachmentsType = Attachment::class;
26+
protected $attachmentsDataType = 'array';
27+
/**
28+
* Output only. Contains the quoted message `text` with markups added to
29+
* support rich formatting like hyperlinks,custom emojis, markup, etc.
30+
* Populated only for FORWARD quote type.
31+
*
32+
* @var string
33+
*/
34+
public $formattedText;
35+
/**
36+
* Output only. The quoted message's author name. Populated for both REPLY &
37+
* FORWARD quote types.
38+
*
39+
* @var string
40+
*/
41+
public $sender;
42+
/**
43+
* Output only. Snapshot of the quoted message's text content.
44+
*
45+
* @var string
46+
*/
47+
public $text;
48+
49+
/**
50+
* Output only. Annotations parsed from the text body of the quoted message.
51+
* Populated only for FORWARD quote type.
52+
*
53+
* @param Annotation[] $annotations
54+
*/
55+
public function setAnnotations($annotations)
56+
{
57+
$this->annotations = $annotations;
58+
}
59+
/**
60+
* @return Annotation[]
61+
*/
62+
public function getAnnotations()
63+
{
64+
return $this->annotations;
65+
}
66+
/**
67+
* Output only. Attachments that were part of the quoted message. These are
68+
* copies of the quoted message's attachment metadata. Populated only for
69+
* FORWARD quote type.
70+
*
71+
* @param Attachment[] $attachments
72+
*/
73+
public function setAttachments($attachments)
74+
{
75+
$this->attachments = $attachments;
76+
}
77+
/**
78+
* @return Attachment[]
79+
*/
80+
public function getAttachments()
81+
{
82+
return $this->attachments;
83+
}
84+
/**
85+
* Output only. Contains the quoted message `text` with markups added to
86+
* support rich formatting like hyperlinks,custom emojis, markup, etc.
87+
* Populated only for FORWARD quote type.
88+
*
89+
* @param string $formattedText
90+
*/
91+
public function setFormattedText($formattedText)
92+
{
93+
$this->formattedText = $formattedText;
94+
}
95+
/**
96+
* @return string
97+
*/
98+
public function getFormattedText()
99+
{
100+
return $this->formattedText;
101+
}
102+
/**
103+
* Output only. The quoted message's author name. Populated for both REPLY &
104+
* FORWARD quote types.
105+
*
106+
* @param string $sender
107+
*/
108+
public function setSender($sender)
109+
{
110+
$this->sender = $sender;
111+
}
112+
/**
113+
* @return string
114+
*/
115+
public function getSender()
116+
{
117+
return $this->sender;
118+
}
119+
/**
120+
* Output only. Snapshot of the quoted message's text content.
121+
*
122+
* @param string $text
123+
*/
124+
public function setText($text)
125+
{
126+
$this->text = $text;
127+
}
128+
/**
129+
* @return string
130+
*/
131+
public function getText()
132+
{
133+
return $this->text;
134+
}
135+
}
136+
137+
// Adding a class alias for backwards compatibility with the previous class name.
138+
class_alias(QuotedMessageSnapshot::class, 'Google_Service_HangoutsChat_QuotedMessageSnapshot');

0 commit comments

Comments
 (0)