Skip to content

Commit 7501890

Browse files
1 parent ea7812b commit 7501890

10 files changed

Lines changed: 274 additions & 61 deletions

src/WorkloadManager.php

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class WorkloadManager extends \Google\Service
4242

4343
public $projects_locations;
4444
public $projects_locations_discoveredprofiles;
45+
public $projects_locations_discoveredprofiles_health;
4546
public $projects_locations_evaluations;
4647
public $projects_locations_evaluations_executions;
4748
public $projects_locations_evaluations_executions_results;
@@ -121,7 +122,17 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
121122
'discoveredprofiles',
122123
[
123124
'methods' => [
124-
'list' => [
125+
'get' => [
126+
'path' => 'v1/{+name}',
127+
'httpMethod' => 'GET',
128+
'parameters' => [
129+
'name' => [
130+
'location' => 'path',
131+
'type' => 'string',
132+
'required' => true,
133+
],
134+
],
135+
],'list' => [
125136
'path' => 'v1/{+parent}/discoveredprofiles',
126137
'httpMethod' => 'GET',
127138
'parameters' => [
@@ -147,6 +158,26 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
147158
]
148159
]
149160
);
161+
$this->projects_locations_discoveredprofiles_health = new WorkloadManager\Resource\ProjectsLocationsDiscoveredprofilesHealth(
162+
$this,
163+
$this->serviceName,
164+
'health',
165+
[
166+
'methods' => [
167+
'get' => [
168+
'path' => 'v1/{+name}',
169+
'httpMethod' => 'GET',
170+
'parameters' => [
171+
'name' => [
172+
'location' => 'path',
173+
'type' => 'string',
174+
'required' => true,
175+
],
176+
],
177+
],
178+
]
179+
]
180+
);
150181
$this->projects_locations_evaluations = new WorkloadManager\Resource\ProjectsLocationsEvaluations(
151182
$this,
152183
$this->serviceName,

src/WorkloadManager/ComponentHealth.php

Lines changed: 72 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,70 @@
1919

2020
class ComponentHealth extends \Google\Collection
2121
{
22-
protected $collection_key = 'subComponentHealthes';
2322
/**
23+
* Unspecified
24+
*/
25+
public const COMPONENT_HEALTH_TYPE_TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED';
26+
/**
27+
* required
28+
*/
29+
public const COMPONENT_HEALTH_TYPE_TYPE_REQUIRED = 'TYPE_REQUIRED';
30+
/**
31+
* optional
32+
*/
33+
public const COMPONENT_HEALTH_TYPE_TYPE_OPTIONAL = 'TYPE_OPTIONAL';
34+
/**
35+
* special
36+
*/
37+
public const COMPONENT_HEALTH_TYPE_TYPE_SPECIAL = 'TYPE_SPECIAL';
38+
/**
39+
* Unspecified.
40+
*/
41+
public const STATE_HEALTH_STATE_UNSPECIFIED = 'HEALTH_STATE_UNSPECIFIED';
42+
/**
43+
* Healthy workload.
44+
*/
45+
public const STATE_HEALTHY = 'HEALTHY';
46+
/**
47+
* Unhealthy workload.
48+
*/
49+
public const STATE_UNHEALTHY = 'UNHEALTHY';
50+
/**
51+
* Has critical issues.
52+
*/
53+
public const STATE_CRITICAL = 'CRITICAL';
54+
/**
55+
* Unsupported.
56+
*/
57+
public const STATE_UNSUPPORTED = 'UNSUPPORTED';
58+
protected $collection_key = 'subComponentsHealth';
59+
/**
60+
* The component of a workload.
61+
*
2462
* @var string
2563
*/
2664
public $component;
2765
protected $componentHealthChecksType = HealthCheck::class;
2866
protected $componentHealthChecksDataType = 'array';
2967
/**
68+
* Output only. The type of the component health.
69+
*
3070
* @var string
3171
*/
3272
public $componentHealthType;
3373
/**
34-
* @var bool
35-
*/
36-
public $isRequired;
37-
/**
74+
* Output only. The health state of the component.
75+
*
3876
* @var string
3977
*/
4078
public $state;
41-
protected $subComponentHealthesType = ComponentHealth::class;
42-
protected $subComponentHealthesDataType = 'array';
79+
protected $subComponentsHealthType = ComponentHealth::class;
80+
protected $subComponentsHealthDataType = 'array';
4381

4482
/**
45-
* @param string
83+
* The component of a workload.
84+
*
85+
* @param string $component
4686
*/
4787
public function setComponent($component)
4888
{
@@ -56,7 +96,9 @@ public function getComponent()
5696
return $this->component;
5797
}
5898
/**
59-
* @param HealthCheck[]
99+
* The detailed health checks of the component.
100+
*
101+
* @param HealthCheck[] $componentHealthChecks
60102
*/
61103
public function setComponentHealthChecks($componentHealthChecks)
62104
{
@@ -70,60 +112,58 @@ public function getComponentHealthChecks()
70112
return $this->componentHealthChecks;
71113
}
72114
/**
73-
* @param string
115+
* Output only. The type of the component health.
116+
*
117+
* Accepted values: TYPE_UNSPECIFIED, TYPE_REQUIRED, TYPE_OPTIONAL,
118+
* TYPE_SPECIAL
119+
*
120+
* @param self::COMPONENT_HEALTH_TYPE_* $componentHealthType
74121
*/
75122
public function setComponentHealthType($componentHealthType)
76123
{
77124
$this->componentHealthType = $componentHealthType;
78125
}
79126
/**
80-
* @return string
127+
* @return self::COMPONENT_HEALTH_TYPE_*
81128
*/
82129
public function getComponentHealthType()
83130
{
84131
return $this->componentHealthType;
85132
}
86133
/**
87-
* @param bool
88-
*/
89-
public function setIsRequired($isRequired)
90-
{
91-
$this->isRequired = $isRequired;
92-
}
93-
/**
94-
* @return bool
95-
*/
96-
public function getIsRequired()
97-
{
98-
return $this->isRequired;
99-
}
100-
/**
101-
* @param string
134+
* Output only. The health state of the component.
135+
*
136+
* Accepted values: HEALTH_STATE_UNSPECIFIED, HEALTHY, UNHEALTHY, CRITICAL,
137+
* UNSUPPORTED
138+
*
139+
* @param self::STATE_* $state
102140
*/
103141
public function setState($state)
104142
{
105143
$this->state = $state;
106144
}
107145
/**
108-
* @return string
146+
* @return self::STATE_*
109147
*/
110148
public function getState()
111149
{
112150
return $this->state;
113151
}
114152
/**
115-
* @param ComponentHealth[]
153+
* Sub component health.
154+
*
155+
* @param ComponentHealth[] $subComponentsHealth
116156
*/
117-
public function setSubComponentHealthes($subComponentHealthes)
157+
public function setSubComponentsHealth($subComponentsHealth)
118158
{
119-
$this->subComponentHealthes = $subComponentHealthes;
159+
$this->subComponentsHealth = $subComponentsHealth;
120160
}
121161
/**
122162
* @return ComponentHealth[]
123163
*/
124-
public function getSubComponentHealthes()
164+
public function getSubComponentsHealth()
125165
{
126-
return $this->subComponentHealthes;
166+
return $this->subComponentsHealth;
127167
}
128168
}
129169

src/WorkloadManager/DatabaseProperties.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class DatabaseProperties extends \Google\Model
5050
protected $backupPropertiesType = BackupProperties::class;
5151
protected $backupPropertiesDataType = '';
5252
/**
53-
* Output only. Type of the database. HANA, DB2, etc.
53+
* Output only. Type of the database. `HANA`, `DB2`, etc.
5454
*
5555
* @var string
5656
*/
@@ -73,7 +73,7 @@ public function getBackupProperties()
7373
return $this->backupProperties;
7474
}
7575
/**
76-
* Output only. Type of the database. HANA, DB2, etc.
76+
* Output only. Type of the database. `HANA`, `DB2`, etc.
7777
*
7878
* Accepted values: DATABASE_TYPE_UNSPECIFIED, HANA, MAX_DB, DB2, ORACLE,
7979
* SQLSERVER, ASE

src/WorkloadManager/HealthCheck.php

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,60 @@
2020
class HealthCheck extends \Google\Model
2121
{
2222
/**
23+
* Unspecified
24+
*/
25+
public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
26+
/**
27+
* passed
28+
*/
29+
public const STATE_PASSED = 'PASSED';
30+
/**
31+
* failed
32+
*/
33+
public const STATE_FAILED = 'FAILED';
34+
/**
35+
* degraded
36+
*/
37+
public const STATE_DEGRADED = 'DEGRADED';
38+
/**
39+
* skipped
40+
*/
41+
public const STATE_SKIPPED = 'SKIPPED';
42+
/**
43+
* unsupported
44+
*/
45+
public const STATE_UNSUPPORTED = 'UNSUPPORTED';
46+
/**
47+
* Output only. The message of the health check.
48+
*
2349
* @var string
2450
*/
2551
public $message;
2652
/**
53+
* Output only. The health check source metric name.
54+
*
2755
* @var string
2856
*/
2957
public $metric;
3058
protected $resourceType = CloudResource::class;
3159
protected $resourceDataType = '';
3260
/**
61+
* Output only. The source of the health check.
62+
*
3363
* @var string
3464
*/
3565
public $source;
3666
/**
67+
* Output only. The state of the health check.
68+
*
3769
* @var string
3870
*/
3971
public $state;
4072

4173
/**
42-
* @param string
74+
* Output only. The message of the health check.
75+
*
76+
* @param string $message
4377
*/
4478
public function setMessage($message)
4579
{
@@ -53,7 +87,9 @@ public function getMessage()
5387
return $this->message;
5488
}
5589
/**
56-
* @param string
90+
* Output only. The health check source metric name.
91+
*
92+
* @param string $metric
5793
*/
5894
public function setMetric($metric)
5995
{
@@ -67,7 +103,9 @@ public function getMetric()
67103
return $this->metric;
68104
}
69105
/**
70-
* @param CloudResource
106+
* Output only. The resource the check performs on.
107+
*
108+
* @param CloudResource $resource
71109
*/
72110
public function setResource(CloudResource $resource)
73111
{
@@ -81,7 +119,9 @@ public function getResource()
81119
return $this->resource;
82120
}
83121
/**
84-
* @param string
122+
* Output only. The source of the health check.
123+
*
124+
* @param string $source
85125
*/
86126
public function setSource($source)
87127
{
@@ -95,14 +135,19 @@ public function getSource()
95135
return $this->source;
96136
}
97137
/**
98-
* @param string
138+
* Output only. The state of the health check.
139+
*
140+
* Accepted values: STATE_UNSPECIFIED, PASSED, FAILED, DEGRADED, SKIPPED,
141+
* UNSUPPORTED
142+
*
143+
* @param self::STATE_* $state
99144
*/
100145
public function setState($state)
101146
{
102147
$this->state = $state;
103148
}
104149
/**
105-
* @return string
150+
* @return self::STATE_*
106151
*/
107152
public function getState()
108153
{

src/WorkloadManager/Resource/ProjectsLocationsDiscoveredprofiles.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
namespace Google\Service\WorkloadManager\Resource;
1919

2020
use Google\Service\WorkloadManager\ListDiscoveredProfilesResponse;
21+
use Google\Service\WorkloadManager\WorkloadProfile;
2122

2223
/**
2324
* The "discoveredprofiles" collection of methods.
@@ -29,6 +30,20 @@
2930
*/
3031
class ProjectsLocationsDiscoveredprofiles extends \Google\Service\Resource
3132
{
33+
/**
34+
* Gets details of a discovered workload profile. (discoveredprofiles.get)
35+
*
36+
* @param string $name Required. Name of the resource
37+
* @param array $optParams Optional parameters.
38+
* @return WorkloadProfile
39+
* @throws \Google\Service\Exception
40+
*/
41+
public function get($name, $optParams = [])
42+
{
43+
$params = ['name' => $name];
44+
$params = array_merge($params, $optParams);
45+
return $this->call('get', [$params], WorkloadProfile::class);
46+
}
3247
/**
3348
* List discovered workload profiles
3449
* (discoveredprofiles.listProjectsLocationsDiscoveredprofiles)

0 commit comments

Comments
 (0)