Skip to content

Commit 413b792

Browse files
1 parent c31f44a commit 413b792

4 files changed

Lines changed: 145 additions & 1 deletion

File tree

src/ManagedKafka.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
181181
'type' => 'string',
182182
'required' => true,
183183
],
184+
'view' => [
185+
'location' => 'query',
186+
'type' => 'string',
187+
],
184188
],
185189
],'list' => [
186190
'path' => 'v1/{+parent}/clusters',

src/ManagedKafka/BrokerDetails.php

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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\ManagedKafka;
19+
20+
class BrokerDetails extends \Google\Model
21+
{
22+
/**
23+
* Output only. The index of the broker.
24+
*
25+
* @var string
26+
*/
27+
public $brokerIndex;
28+
/**
29+
* Output only. The node id of the broker.
30+
*
31+
* @var string
32+
*/
33+
public $nodeId;
34+
/**
35+
* Output only. The rack of the broker.
36+
*
37+
* @var string
38+
*/
39+
public $rack;
40+
41+
/**
42+
* Output only. The index of the broker.
43+
*
44+
* @param string $brokerIndex
45+
*/
46+
public function setBrokerIndex($brokerIndex)
47+
{
48+
$this->brokerIndex = $brokerIndex;
49+
}
50+
/**
51+
* @return string
52+
*/
53+
public function getBrokerIndex()
54+
{
55+
return $this->brokerIndex;
56+
}
57+
/**
58+
* Output only. The node id of the broker.
59+
*
60+
* @param string $nodeId
61+
*/
62+
public function setNodeId($nodeId)
63+
{
64+
$this->nodeId = $nodeId;
65+
}
66+
/**
67+
* @return string
68+
*/
69+
public function getNodeId()
70+
{
71+
return $this->nodeId;
72+
}
73+
/**
74+
* Output only. The rack of the broker.
75+
*
76+
* @param string $rack
77+
*/
78+
public function setRack($rack)
79+
{
80+
$this->rack = $rack;
81+
}
82+
/**
83+
* @return string
84+
*/
85+
public function getRack()
86+
{
87+
return $this->rack;
88+
}
89+
}
90+
91+
// Adding a class alias for backwards compatibility with the previous class name.
92+
class_alias(BrokerDetails::class, 'Google_Service_ManagedKafka_BrokerDetails');

src/ManagedKafka/Cluster.php

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

1818
namespace Google\Service\ManagedKafka;
1919

20-
class Cluster extends \Google\Model
20+
class Cluster extends \Google\Collection
2121
{
2222
/**
2323
* A state was not specified.
@@ -35,6 +35,9 @@ class Cluster extends \Google\Model
3535
* The cluster is being deleted.
3636
*/
3737
public const STATE_DELETING = 'DELETING';
38+
protected $collection_key = 'brokerDetails';
39+
protected $brokerDetailsType = BrokerDetails::class;
40+
protected $brokerDetailsDataType = 'array';
3841
protected $capacityConfigType = CapacityConfig::class;
3942
protected $capacityConfigDataType = '';
4043
/**
@@ -45,6 +48,13 @@ class Cluster extends \Google\Model
4548
public $createTime;
4649
protected $gcpConfigType = GcpConfig::class;
4750
protected $gcpConfigDataType = '';
51+
/**
52+
* Output only. Only populated when FULL view is requested. The Kafka version
53+
* of the cluster.
54+
*
55+
* @var string
56+
*/
57+
public $kafkaVersion;
4858
/**
4959
* Optional. Labels as key value pairs.
5060
*
@@ -89,6 +99,23 @@ class Cluster extends \Google\Model
8999
*/
90100
public $updateTime;
91101

102+
/**
103+
* Output only. Only populated when FULL view is requested. Details of each
104+
* broker in the cluster.
105+
*
106+
* @param BrokerDetails[] $brokerDetails
107+
*/
108+
public function setBrokerDetails($brokerDetails)
109+
{
110+
$this->brokerDetails = $brokerDetails;
111+
}
112+
/**
113+
* @return BrokerDetails[]
114+
*/
115+
public function getBrokerDetails()
116+
{
117+
return $this->brokerDetails;
118+
}
92119
/**
93120
* Required. Capacity configuration for the Kafka cluster.
94121
*
@@ -138,6 +165,23 @@ public function getGcpConfig()
138165
{
139166
return $this->gcpConfig;
140167
}
168+
/**
169+
* Output only. Only populated when FULL view is requested. The Kafka version
170+
* of the cluster.
171+
*
172+
* @param string $kafkaVersion
173+
*/
174+
public function setKafkaVersion($kafkaVersion)
175+
{
176+
$this->kafkaVersion = $kafkaVersion;
177+
}
178+
/**
179+
* @return string
180+
*/
181+
public function getKafkaVersion()
182+
{
183+
return $this->kafkaVersion;
184+
}
141185
/**
142186
* Optional. Labels as key value pairs.
143187
*

src/ManagedKafka/Resource/ProjectsLocationsClusters.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ public function delete($name, $optParams = [])
9696
* @param string $name Required. The name of the cluster whose configuration to
9797
* return.
9898
* @param array $optParams Optional parameters.
99+
*
100+
* @opt_param string view Optional. Specifies the view of the Cluster resource
101+
* to be returned. Defaults to CLUSTER_VIEW_BASIC. See the ClusterView enum for
102+
* possible values.
99103
* @return Cluster
100104
* @throws \Google\Service\Exception
101105
*/

0 commit comments

Comments
 (0)