Skip to content

Commit b5edf7e

Browse files
1 parent e1f2f06 commit b5edf7e

2 files changed

Lines changed: 96 additions & 1 deletion

File tree

src/ServiceUsage/Aspect.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@
1717

1818
namespace Google\Service\ServiceUsage;
1919

20-
class Aspect extends \Google\Model
20+
class Aspect extends \Google\Collection
2121
{
22+
protected $collection_key = 'rules';
2223
/**
2324
* The type of this aspect configuration.
2425
*
2526
* @var string
2627
*/
2728
public $kind;
29+
protected $rulesType = AspectRule::class;
30+
protected $rulesDataType = 'array';
2831
/**
2932
* Content of the configuration. The underlying schema should be defined by
3033
* Aspect owners as protobuf message under `google/api/configaspects/proto`.
@@ -49,6 +52,22 @@ public function getKind()
4952
{
5053
return $this->kind;
5154
}
55+
/**
56+
* Optional. Rules of the Configuration.
57+
*
58+
* @param AspectRule[] $rules
59+
*/
60+
public function setRules($rules)
61+
{
62+
$this->rules = $rules;
63+
}
64+
/**
65+
* @return AspectRule[]
66+
*/
67+
public function getRules()
68+
{
69+
return $this->rules;
70+
}
5271
/**
5372
* Content of the configuration. The underlying schema should be defined by
5473
* Aspect owners as protobuf message under `google/api/configaspects/proto`.

src/ServiceUsage/AspectRule.php

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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\ServiceUsage;
19+
20+
class AspectRule extends \Google\Model
21+
{
22+
/**
23+
* Required. Rules of the configuration. The underlying schema should be
24+
* defined by Aspect owners as protobuf message under
25+
* `google/api/configaspects/proto`.
26+
*
27+
* @var array[]
28+
*/
29+
public $config;
30+
/**
31+
* Required. Selects the RPC methods to which this rule applies. Refer to
32+
* selector for syntax details.
33+
*
34+
* @var string
35+
*/
36+
public $selector;
37+
38+
/**
39+
* Required. Rules of the configuration. The underlying schema should be
40+
* defined by Aspect owners as protobuf message under
41+
* `google/api/configaspects/proto`.
42+
*
43+
* @param array[] $config
44+
*/
45+
public function setConfig($config)
46+
{
47+
$this->config = $config;
48+
}
49+
/**
50+
* @return array[]
51+
*/
52+
public function getConfig()
53+
{
54+
return $this->config;
55+
}
56+
/**
57+
* Required. Selects the RPC methods to which this rule applies. Refer to
58+
* selector for syntax details.
59+
*
60+
* @param string $selector
61+
*/
62+
public function setSelector($selector)
63+
{
64+
$this->selector = $selector;
65+
}
66+
/**
67+
* @return string
68+
*/
69+
public function getSelector()
70+
{
71+
return $this->selector;
72+
}
73+
}
74+
75+
// Adding a class alias for backwards compatibility with the previous class name.
76+
class_alias(AspectRule::class, 'Google_Service_ServiceUsage_AspectRule');

0 commit comments

Comments
 (0)