Skip to content

Commit ccc72e2

Browse files
1 parent 034b198 commit ccc72e2

3 files changed

Lines changed: 102 additions & 9 deletions

File tree

src/WorkloadManager/ExternalDataSources.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ class ExternalDataSources extends \Google\Model
2828
*/
2929
public const TYPE_BIG_QUERY_TABLE = 'BIG_QUERY_TABLE';
3030
/**
31-
* Required. The asset type of the external data source this can be one of
32-
* go/cai-asset-types to override the default asset type or it can be a custom
33-
* type defined by the user custom type must match the asset type in the rule
31+
* Required. The asset type of the external data source. This can be a
32+
* supported Cloud Asset Inventory asset type (see
33+
* https://cloud.google.com/asset-inventory/docs/supported-asset-types) to
34+
* override the default asset type, or it can be a custom type defined by the
35+
* user.
3436
*
3537
* @var string
3638
*/
@@ -57,9 +59,11 @@ class ExternalDataSources extends \Google\Model
5759
public $uri;
5860

5961
/**
60-
* Required. The asset type of the external data source this can be one of
61-
* go/cai-asset-types to override the default asset type or it can be a custom
62-
* type defined by the user custom type must match the asset type in the rule
62+
* Required. The asset type of the external data source. This can be a
63+
* supported Cloud Asset Inventory asset type (see
64+
* https://cloud.google.com/asset-inventory/docs/supported-asset-types) to
65+
* override the default asset type, or it can be a custom type defined by the
66+
* user.
6367
*
6468
* @param string $assetType
6569
*/

src/WorkloadManager/RuleOutput.php

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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\WorkloadManager;
19+
20+
class RuleOutput extends \Google\Model
21+
{
22+
/**
23+
* Output only. Violation details generated by rule.
24+
*
25+
* @var string[]
26+
*/
27+
public $details;
28+
/**
29+
* Output only. The message generated by rule.
30+
*
31+
* @var string
32+
*/
33+
public $message;
34+
35+
/**
36+
* Output only. Violation details generated by rule.
37+
*
38+
* @param string[] $details
39+
*/
40+
public function setDetails($details)
41+
{
42+
$this->details = $details;
43+
}
44+
/**
45+
* @return string[]
46+
*/
47+
public function getDetails()
48+
{
49+
return $this->details;
50+
}
51+
/**
52+
* Output only. The message generated by rule.
53+
*
54+
* @param string $message
55+
*/
56+
public function setMessage($message)
57+
{
58+
$this->message = $message;
59+
}
60+
/**
61+
* @return string
62+
*/
63+
public function getMessage()
64+
{
65+
return $this->message;
66+
}
67+
}
68+
69+
// Adding a class alias for backwards compatibility with the previous class name.
70+
class_alias(RuleOutput::class, 'Google_Service_WorkloadManager_RuleOutput');

src/WorkloadManager/ViolationDetails.php

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@
1717

1818
namespace Google\Service\WorkloadManager;
1919

20-
class ViolationDetails extends \Google\Model
20+
class ViolationDetails extends \Google\Collection
2121
{
22+
protected $collection_key = 'ruleOutput';
2223
/**
2324
* The name of the asset.
2425
*
2526
* @var string
2627
*/
2728
public $asset;
2829
/**
29-
* Details of the violation. TODO(b/452163887)
30+
* Details of the violation.
3031
*
3132
* @var string[]
3233
*/
3334
public $observed;
35+
protected $ruleOutputType = RuleOutput::class;
36+
protected $ruleOutputDataType = 'array';
3437
/**
3538
* The service account associated with the resource.
3639
*
@@ -55,7 +58,7 @@ public function getAsset()
5558
return $this->asset;
5659
}
5760
/**
58-
* Details of the violation. TODO(b/452163887)
61+
* Details of the violation.
5962
*
6063
* @param string[] $observed
6164
*/
@@ -70,6 +73,22 @@ public function getObserved()
7073
{
7174
return $this->observed;
7275
}
76+
/**
77+
* Output only. The rule output of the violation.
78+
*
79+
* @param RuleOutput[] $ruleOutput
80+
*/
81+
public function setRuleOutput($ruleOutput)
82+
{
83+
$this->ruleOutput = $ruleOutput;
84+
}
85+
/**
86+
* @return RuleOutput[]
87+
*/
88+
public function getRuleOutput()
89+
{
90+
return $this->ruleOutput;
91+
}
7392
/**
7493
* The service account associated with the resource.
7594
*

0 commit comments

Comments
 (0)