Skip to content

Commit 5d51de7

Browse files
1 parent 15e5c20 commit 5d51de7

2 files changed

Lines changed: 103 additions & 0 deletions

File tree

src/Docs/InsertRichLinkRequest.php

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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\Docs;
19+
20+
class InsertRichLinkRequest extends \Google\Model
21+
{
22+
protected $endOfSegmentLocationType = EndOfSegmentLocation::class;
23+
protected $endOfSegmentLocationDataType = '';
24+
protected $locationType = Location::class;
25+
protected $locationDataType = '';
26+
protected $richLinkPropertiesType = RichLinkProperties::class;
27+
protected $richLinkPropertiesDataType = '';
28+
29+
/**
30+
* Inserts the rich link at the end of a header, footer, footnote or the
31+
* document body.
32+
*
33+
* @param EndOfSegmentLocation $endOfSegmentLocation
34+
*/
35+
public function setEndOfSegmentLocation(EndOfSegmentLocation $endOfSegmentLocation)
36+
{
37+
$this->endOfSegmentLocation = $endOfSegmentLocation;
38+
}
39+
/**
40+
* @return EndOfSegmentLocation
41+
*/
42+
public function getEndOfSegmentLocation()
43+
{
44+
return $this->endOfSegmentLocation;
45+
}
46+
/**
47+
* Inserts the rich link at a specific index in the document. The rich link
48+
* must be inserted inside the bounds of an existing Paragraph. For instance,
49+
* it cannot be inserted at a table's start index (i.e. between the table and
50+
* its preceding paragraph). The rich link cannot be inserted inside an
51+
* equation.
52+
*
53+
* @param Location $location
54+
*/
55+
public function setLocation(Location $location)
56+
{
57+
$this->location = $location;
58+
}
59+
/**
60+
* @return Location
61+
*/
62+
public function getLocation()
63+
{
64+
return $this->location;
65+
}
66+
/**
67+
* The properties of the rich link to insert.
68+
*
69+
* @param RichLinkProperties $richLinkProperties
70+
*/
71+
public function setRichLinkProperties(RichLinkProperties $richLinkProperties)
72+
{
73+
$this->richLinkProperties = $richLinkProperties;
74+
}
75+
/**
76+
* @return RichLinkProperties
77+
*/
78+
public function getRichLinkProperties()
79+
{
80+
return $this->richLinkProperties;
81+
}
82+
}
83+
84+
// Adding a class alias for backwards compatibility with the previous class name.
85+
class_alias(InsertRichLinkRequest::class, 'Google_Service_Docs_InsertRichLinkRequest');

src/Docs/Request.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class Request extends \Google\Model
5757
protected $insertPageBreakDataType = '';
5858
protected $insertPersonType = InsertPersonRequest::class;
5959
protected $insertPersonDataType = '';
60+
protected $insertRichLinkType = InsertRichLinkRequest::class;
61+
protected $insertRichLinkDataType = '';
6062
protected $insertSectionBreakType = InsertSectionBreakRequest::class;
6163
protected $insertSectionBreakDataType = '';
6264
protected $insertTableType = InsertTableRequest::class;
@@ -400,6 +402,22 @@ public function getInsertPerson()
400402
{
401403
return $this->insertPerson;
402404
}
405+
/**
406+
* Insert a rich link.
407+
*
408+
* @param InsertRichLinkRequest $insertRichLink
409+
*/
410+
public function setInsertRichLink(InsertRichLinkRequest $insertRichLink)
411+
{
412+
$this->insertRichLink = $insertRichLink;
413+
}
414+
/**
415+
* @return InsertRichLinkRequest
416+
*/
417+
public function getInsertRichLink()
418+
{
419+
return $this->insertRichLink;
420+
}
403421
/**
404422
* Inserts a section break at the specified location.
405423
*

0 commit comments

Comments
 (0)