Skip to content

Commit 396d474

Browse files
1 parent 670d19c commit 396d474

48 files changed

Lines changed: 3751 additions & 327 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Compute.php

Lines changed: 407 additions & 0 deletions
Large diffs are not rendered by default.

src/Compute/Backend.php

Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class Backend extends \Google\Collection
2727
* Based on custom defined and reported metrics.
2828
*/
2929
public const BALANCING_MODE_CUSTOM_METRICS = 'CUSTOM_METRICS';
30+
/**
31+
* Balance based on the number of in-flight requests.
32+
*/
33+
public const BALANCING_MODE_IN_FLIGHT = 'IN_FLIGHT';
3034
/**
3135
* Balance based on requests per second (RPS).
3236
*/
@@ -47,6 +51,19 @@ class Backend extends \Google\Collection
4751
* Traffic will be sent to this backend first.
4852
*/
4953
public const PREFERENCE_PREFERRED = 'PREFERRED';
54+
/**
55+
* Most of the requests are expected to take more than multiple seconds to
56+
* finish.
57+
*/
58+
public const TRAFFIC_DURATION_LONG = 'LONG';
59+
/**
60+
* Most requests are expected to finish with a sub-second latency.
61+
*/
62+
public const TRAFFIC_DURATION_SHORT = 'SHORT';
63+
/**
64+
* Traffic duration is unspecified.
65+
*/
66+
public const TRAFFIC_DURATION_TRAFFIC_DURATION_UNSPECIFIED = 'TRAFFIC_DURATION_UNSPECIFIED';
5067
protected $collection_key = 'customMetrics';
5168
/**
5269
* Specifies how to determine whether the backend of a load balancer can
@@ -140,6 +157,28 @@ class Backend extends \Google\Collection
140157
* @var int
141158
*/
142159
public $maxConnectionsPerInstance;
160+
/**
161+
* Defines a maximum number of in-flight requests for the whole NEG or
162+
* instance group. Not available if backend's balancingMode isRATE or
163+
* CONNECTION.
164+
*
165+
* @var int
166+
*/
167+
public $maxInFlightRequests;
168+
/**
169+
* Defines a maximum number of in-flight requests for a single endpoint. Not
170+
* available if backend's balancingMode is RATE or CONNECTION.
171+
*
172+
* @var int
173+
*/
174+
public $maxInFlightRequestsPerEndpoint;
175+
/**
176+
* Defines a maximum number of in-flight requests for a single VM. Not
177+
* available if backend's balancingMode is RATE or CONNECTION.
178+
*
179+
* @var int
180+
*/
181+
public $maxInFlightRequestsPerInstance;
143182
/**
144183
* Defines a maximum number of HTTP requests per second (RPS). For usage
145184
* guidelines, seeRate balancing mode and Utilization balancing mode.
@@ -190,6 +229,10 @@ class Backend extends \Google\Collection
190229
* @var string
191230
*/
192231
public $preference;
232+
/**
233+
* @var string
234+
*/
235+
public $trafficDuration;
193236

194237
/**
195238
* Specifies how to determine whether the backend of a load balancer can
@@ -206,7 +249,7 @@ class Backend extends \Google\Collection
206249
* Backend.balancingMode is RATE. In the future, this incompatible combination
207250
* will be rejected.
208251
*
209-
* Accepted values: CONNECTION, CUSTOM_METRICS, RATE, UTILIZATION
252+
* Accepted values: CONNECTION, CUSTOM_METRICS, IN_FLIGHT, RATE, UTILIZATION
210253
*
211254
* @param self::BALANCING_MODE_* $balancingMode
212255
*/
@@ -379,6 +422,58 @@ public function getMaxConnectionsPerInstance()
379422
{
380423
return $this->maxConnectionsPerInstance;
381424
}
425+
/**
426+
* Defines a maximum number of in-flight requests for the whole NEG or
427+
* instance group. Not available if backend's balancingMode isRATE or
428+
* CONNECTION.
429+
*
430+
* @param int $maxInFlightRequests
431+
*/
432+
public function setMaxInFlightRequests($maxInFlightRequests)
433+
{
434+
$this->maxInFlightRequests = $maxInFlightRequests;
435+
}
436+
/**
437+
* @return int
438+
*/
439+
public function getMaxInFlightRequests()
440+
{
441+
return $this->maxInFlightRequests;
442+
}
443+
/**
444+
* Defines a maximum number of in-flight requests for a single endpoint. Not
445+
* available if backend's balancingMode is RATE or CONNECTION.
446+
*
447+
* @param int $maxInFlightRequestsPerEndpoint
448+
*/
449+
public function setMaxInFlightRequestsPerEndpoint($maxInFlightRequestsPerEndpoint)
450+
{
451+
$this->maxInFlightRequestsPerEndpoint = $maxInFlightRequestsPerEndpoint;
452+
}
453+
/**
454+
* @return int
455+
*/
456+
public function getMaxInFlightRequestsPerEndpoint()
457+
{
458+
return $this->maxInFlightRequestsPerEndpoint;
459+
}
460+
/**
461+
* Defines a maximum number of in-flight requests for a single VM. Not
462+
* available if backend's balancingMode is RATE or CONNECTION.
463+
*
464+
* @param int $maxInFlightRequestsPerInstance
465+
*/
466+
public function setMaxInFlightRequestsPerInstance($maxInFlightRequestsPerInstance)
467+
{
468+
$this->maxInFlightRequestsPerInstance = $maxInFlightRequestsPerInstance;
469+
}
470+
/**
471+
* @return int
472+
*/
473+
public function getMaxInFlightRequestsPerInstance()
474+
{
475+
return $this->maxInFlightRequestsPerInstance;
476+
}
382477
/**
383478
* Defines a maximum number of HTTP requests per second (RPS). For usage
384479
* guidelines, seeRate balancing mode and Utilization balancing mode.
@@ -495,6 +590,20 @@ public function getPreference()
495590
{
496591
return $this->preference;
497592
}
593+
/**
594+
* @param self::TRAFFIC_DURATION_* $trafficDuration
595+
*/
596+
public function setTrafficDuration($trafficDuration)
597+
{
598+
$this->trafficDuration = $trafficDuration;
599+
}
600+
/**
601+
* @return self::TRAFFIC_DURATION_*
602+
*/
603+
public function getTrafficDuration()
604+
{
605+
return $this->trafficDuration;
606+
}
498607
}
499608

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

src/Compute/BackendBucket.php

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ class BackendBucket extends \Google\Collection
2929
* will not be served to clients.
3030
*/
3131
public const COMPRESSION_MODE_DISABLED = 'DISABLED';
32+
/**
33+
* Signifies that this will be used for regional external Application Load
34+
* Balancers.
35+
*/
36+
public const LOAD_BALANCING_SCHEME_EXTERNAL_MANAGED = 'EXTERNAL_MANAGED';
3237
/**
3338
* Signifies that this will be used for internal Application Load Balancers.
3439
*/
@@ -118,6 +123,15 @@ class BackendBucket extends \Google\Collection
118123
public $name;
119124
protected $paramsType = BackendBucketParams::class;
120125
protected $paramsDataType = '';
126+
/**
127+
* Output only. [Output Only] URL of the region where the regional backend
128+
* bucket resides. This field is not applicable to global backend buckets. You
129+
* must specify this field as part of the HTTP request URL. It is not settable
130+
* as a field in the request body.
131+
*
132+
* @var string
133+
*/
134+
public $region;
121135
/**
122136
* [Output Only] Server-defined URL for the resource.
123137
*
@@ -300,7 +314,7 @@ public function getKind()
300314
* classic global external load balancers, or global application external load
301315
* balancers, or both.
302316
*
303-
* Accepted values: INTERNAL_MANAGED
317+
* Accepted values: EXTERNAL_MANAGED, INTERNAL_MANAGED
304318
*
305319
* @param self::LOAD_BALANCING_SCHEME_* $loadBalancingScheme
306320
*/
@@ -354,6 +368,25 @@ public function getParams()
354368
{
355369
return $this->params;
356370
}
371+
/**
372+
* Output only. [Output Only] URL of the region where the regional backend
373+
* bucket resides. This field is not applicable to global backend buckets. You
374+
* must specify this field as part of the HTTP request URL. It is not settable
375+
* as a field in the request body.
376+
*
377+
* @param string $region
378+
*/
379+
public function setRegion($region)
380+
{
381+
$this->region = $region;
382+
}
383+
/**
384+
* @return string
385+
*/
386+
public function getRegion()
387+
{
388+
return $this->region;
389+
}
357390
/**
358391
* [Output Only] Server-defined URL for the resource.
359392
*
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
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\Compute;
19+
20+
class BackendBucketAggregatedList extends \Google\Model
21+
{
22+
/**
23+
* [Output Only] Unique identifier for the resource; defined by the server.
24+
*
25+
* @var string
26+
*/
27+
public $id;
28+
protected $itemsType = BackendBucketsScopedList::class;
29+
protected $itemsDataType = 'map';
30+
/**
31+
* Output only. Type of resource.
32+
*
33+
* @var string
34+
*/
35+
public $kind;
36+
/**
37+
* [Output Only] This token allows you to get the next page of results for
38+
* list requests. If the number of results is larger thanmaxResults, use the
39+
* nextPageToken as a value for the query parameter pageToken in the next list
40+
* request. Subsequent list requests will have their own nextPageToken to
41+
* continue paging through the results.
42+
*
43+
* @var string
44+
*/
45+
public $nextPageToken;
46+
/**
47+
* Output only. [Output Only] Server-defined URL for this resource.
48+
*
49+
* @var string
50+
*/
51+
public $selfLink;
52+
protected $warningType = BackendBucketAggregatedListWarning::class;
53+
protected $warningDataType = '';
54+
55+
/**
56+
* [Output Only] Unique identifier for the resource; defined by the server.
57+
*
58+
* @param string $id
59+
*/
60+
public function setId($id)
61+
{
62+
$this->id = $id;
63+
}
64+
/**
65+
* @return string
66+
*/
67+
public function getId()
68+
{
69+
return $this->id;
70+
}
71+
/**
72+
* A list of BackendBucketsScopedList resources.
73+
*
74+
* @param BackendBucketsScopedList[] $items
75+
*/
76+
public function setItems($items)
77+
{
78+
$this->items = $items;
79+
}
80+
/**
81+
* @return BackendBucketsScopedList[]
82+
*/
83+
public function getItems()
84+
{
85+
return $this->items;
86+
}
87+
/**
88+
* Output only. Type of resource.
89+
*
90+
* @param string $kind
91+
*/
92+
public function setKind($kind)
93+
{
94+
$this->kind = $kind;
95+
}
96+
/**
97+
* @return string
98+
*/
99+
public function getKind()
100+
{
101+
return $this->kind;
102+
}
103+
/**
104+
* [Output Only] This token allows you to get the next page of results for
105+
* list requests. If the number of results is larger thanmaxResults, use the
106+
* nextPageToken as a value for the query parameter pageToken in the next list
107+
* request. Subsequent list requests will have their own nextPageToken to
108+
* continue paging through the results.
109+
*
110+
* @param string $nextPageToken
111+
*/
112+
public function setNextPageToken($nextPageToken)
113+
{
114+
$this->nextPageToken = $nextPageToken;
115+
}
116+
/**
117+
* @return string
118+
*/
119+
public function getNextPageToken()
120+
{
121+
return $this->nextPageToken;
122+
}
123+
/**
124+
* Output only. [Output Only] Server-defined URL for this resource.
125+
*
126+
* @param string $selfLink
127+
*/
128+
public function setSelfLink($selfLink)
129+
{
130+
$this->selfLink = $selfLink;
131+
}
132+
/**
133+
* @return string
134+
*/
135+
public function getSelfLink()
136+
{
137+
return $this->selfLink;
138+
}
139+
/**
140+
* [Output Only] Informational warning message.
141+
*
142+
* @param BackendBucketAggregatedListWarning $warning
143+
*/
144+
public function setWarning(BackendBucketAggregatedListWarning $warning)
145+
{
146+
$this->warning = $warning;
147+
}
148+
/**
149+
* @return BackendBucketAggregatedListWarning
150+
*/
151+
public function getWarning()
152+
{
153+
return $this->warning;
154+
}
155+
}
156+
157+
// Adding a class alias for backwards compatibility with the previous class name.
158+
class_alias(BackendBucketAggregatedList::class, 'Google_Service_Compute_BackendBucketAggregatedList');

0 commit comments

Comments
 (0)