Skip to content

Commit 7245e2c

Browse files
1 parent 975f6cf commit 7245e2c

4 files changed

Lines changed: 144 additions & 3 deletions

File tree

src/FirebaseAppHosting/Build.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ class Build extends \Google\Collection
4646
* The build has failed.
4747
*/
4848
public const STATE_FAILED = 'FAILED';
49+
/**
50+
* The build was skipped.
51+
*/
52+
public const STATE_SKIPPED = 'SKIPPED';
4953
protected $collection_key = 'errors';
5054
/**
5155
* Optional. Unstructured key value map that may be set by external tools to
@@ -393,7 +397,7 @@ public function getSource()
393397
* Output only. The state of the build.
394398
*
395399
* Accepted values: STATE_UNSPECIFIED, BUILDING, BUILT, DEPLOYING, READY,
396-
* FAILED
400+
* FAILED, SKIPPED
397401
*
398402
* @param self::STATE_* $state
399403
*/

src/FirebaseAppHosting/Path.php

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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\FirebaseAppHosting;
19+
20+
class Path extends \Google\Model
21+
{
22+
/**
23+
* The pattern type is unspecified - this is an invalid value.
24+
*/
25+
public const TYPE_PATTERN_TYPE_UNSPECIFIED = 'PATTERN_TYPE_UNSPECIFIED';
26+
/**
27+
* RE2 - regular expression (https://github.com/google/re2/wiki/Syntax).
28+
*/
29+
public const TYPE_RE2 = 'RE2';
30+
/**
31+
* The pattern is a glob.
32+
*/
33+
public const TYPE_GLOB = 'GLOB';
34+
/**
35+
* The pattern is a prefix.
36+
*/
37+
public const TYPE_PREFIX = 'PREFIX';
38+
/**
39+
* Optional. The pattern to match against.
40+
*
41+
* @var string
42+
*/
43+
public $pattern;
44+
/**
45+
* Optional. The type of pattern to match against.
46+
*
47+
* @var string
48+
*/
49+
public $type;
50+
51+
/**
52+
* Optional. The pattern to match against.
53+
*
54+
* @param string $pattern
55+
*/
56+
public function setPattern($pattern)
57+
{
58+
$this->pattern = $pattern;
59+
}
60+
/**
61+
* @return string
62+
*/
63+
public function getPattern()
64+
{
65+
return $this->pattern;
66+
}
67+
/**
68+
* Optional. The type of pattern to match against.
69+
*
70+
* Accepted values: PATTERN_TYPE_UNSPECIFIED, RE2, GLOB, PREFIX
71+
*
72+
* @param self::TYPE_* $type
73+
*/
74+
public function setType($type)
75+
{
76+
$this->type = $type;
77+
}
78+
/**
79+
* @return self::TYPE_*
80+
*/
81+
public function getType()
82+
{
83+
return $this->type;
84+
}
85+
}
86+
87+
// Adding a class alias for backwards compatibility with the previous class name.
88+
class_alias(Path::class, 'Google_Service_FirebaseAppHosting_Path');

src/FirebaseAppHosting/Rollout.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class Rollout extends \Google\Model
5454
* The rollout has been cancelled.
5555
*/
5656
public const STATE_CANCELLED = 'CANCELLED';
57+
/**
58+
* The rollout has been skipped.
59+
*/
60+
public const STATE_SKIPPED = 'SKIPPED';
5761
/**
5862
* Optional. Unstructured key value map that may be set by external tools to
5963
* store and arbitrary metadata. They are not queryable and should be
@@ -310,7 +314,7 @@ public function getReconciling()
310314
* Output only. The state of the rollout.
311315
*
312316
* Accepted values: STATE_UNSPECIFIED, QUEUED, PENDING_BUILD, PROGRESSING,
313-
* PAUSED, SUCCEEDED, FAILED, CANCELLED
317+
* PAUSED, SUCCEEDED, FAILED, CANCELLED, SKIPPED
314318
*
315319
* @param self::STATE_* $state
316320
*/

src/FirebaseAppHosting/RolloutPolicy.php

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717

1818
namespace Google\Service\FirebaseAppHosting;
1919

20-
class RolloutPolicy extends \Google\Model
20+
class RolloutPolicy extends \Google\Collection
2121
{
22+
protected $collection_key = 'requiredPaths';
2223
/**
2324
* If set, specifies a branch that triggers a new build to be started with
2425
* this policy. Otherwise, no automatic rollouts will happen.
@@ -40,6 +41,10 @@ class RolloutPolicy extends \Google\Model
4041
* @var string
4142
*/
4243
public $disabledTime;
44+
protected $ignoredPathsType = Path::class;
45+
protected $ignoredPathsDataType = 'array';
46+
protected $requiredPathsType = Path::class;
47+
protected $requiredPathsDataType = 'array';
4348

4449
/**
4550
* If set, specifies a branch that triggers a new build to be started with
@@ -92,6 +97,46 @@ public function getDisabledTime()
9297
{
9398
return $this->disabledTime;
9499
}
100+
/**
101+
* Optional. A list of file paths patterns to exclude from triggering a
102+
* rollout. Patterns in this list take precedence over required_paths.
103+
* **Note**: All paths must be in the ignored_paths in order for the rollout
104+
* to be skipped. Limited to 100 paths. Example: ignored_paths: { pattern:
105+
* "foo/bar/excluded” type: GLOB }
106+
*
107+
* @param Path[] $ignoredPaths
108+
*/
109+
public function setIgnoredPaths($ignoredPaths)
110+
{
111+
$this->ignoredPaths = $ignoredPaths;
112+
}
113+
/**
114+
* @return Path[]
115+
*/
116+
public function getIgnoredPaths()
117+
{
118+
return $this->ignoredPaths;
119+
}
120+
/**
121+
* Optional. A list of file paths patterns that trigger a build and rollout if
122+
* at least one of the changed files in the commit are present in this list.
123+
* This field is optional; the rollout policy will default to triggering on
124+
* all paths if not populated. Limited to 100 paths. Example: “required_paths:
125+
* { pattern: "foo/bar” type: GLOB }
126+
*
127+
* @param Path[] $requiredPaths
128+
*/
129+
public function setRequiredPaths($requiredPaths)
130+
{
131+
$this->requiredPaths = $requiredPaths;
132+
}
133+
/**
134+
* @return Path[]
135+
*/
136+
public function getRequiredPaths()
137+
{
138+
return $this->requiredPaths;
139+
}
95140
}
96141

97142
// Adding a class alias for backwards compatibility with the previous class name.

0 commit comments

Comments
 (0)