diff --git a/SecurityCenter/metadata/V1/Finding.php b/SecurityCenter/metadata/V1/Finding.php index ee34cc1657bc..f850bf338287 100644 Binary files a/SecurityCenter/metadata/V1/Finding.php and b/SecurityCenter/metadata/V1/Finding.php differ diff --git a/SecurityCenter/metadata/V1/GroupMembership.php b/SecurityCenter/metadata/V1/GroupMembership.php new file mode 100644 index 000000000000..fac67776518b Binary files /dev/null and b/SecurityCenter/metadata/V1/GroupMembership.php differ diff --git a/SecurityCenter/metadata/V1/ToxicCombination.php b/SecurityCenter/metadata/V1/ToxicCombination.php new file mode 100644 index 000000000000..c95a4ce1508d --- /dev/null +++ b/SecurityCenter/metadata/V1/ToxicCombination.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +Ÿ +6google/cloud/securitycenter/v1/toxic_combination.protogoogle.cloud.securitycenter.v1"K +ToxicCombination +attack_exposure_score ( +related_findings ( Bï +"com.google.cloud.securitycenter.v1BToxicCombinationProtoPZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpbªGoogle.Cloud.SecurityCenter.V1ÊGoogle\\Cloud\\SecurityCenter\\V1ê!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/SecurityCenter/metadata/V2/Finding.php b/SecurityCenter/metadata/V2/Finding.php index 11ce306924f6..2083d9f3ff9a 100644 Binary files a/SecurityCenter/metadata/V2/Finding.php and b/SecurityCenter/metadata/V2/Finding.php differ diff --git a/SecurityCenter/metadata/V2/GroupMembership.php b/SecurityCenter/metadata/V2/GroupMembership.php new file mode 100644 index 000000000000..f024cffe8309 Binary files /dev/null and b/SecurityCenter/metadata/V2/GroupMembership.php differ diff --git a/SecurityCenter/metadata/V2/ToxicCombination.php b/SecurityCenter/metadata/V2/ToxicCombination.php new file mode 100644 index 000000000000..628745d06027 --- /dev/null +++ b/SecurityCenter/metadata/V2/ToxicCombination.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +Ÿ +6google/cloud/securitycenter/v2/toxic_combination.protogoogle.cloud.securitycenter.v2"K +ToxicCombination +attack_exposure_score ( +related_findings ( Bï +"com.google.cloud.securitycenter.v2BToxicCombinationProtoPZJcloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpbªGoogle.Cloud.SecurityCenter.V2ÊGoogle\\Cloud\\SecurityCenter\\V2ê!Google::Cloud::SecurityCenter::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/SecurityCenter/src/V1/Finding.php b/SecurityCenter/src/V1/Finding.php index 8a8361b76953..2635b872f9c5 100644 --- a/SecurityCenter/src/V1/Finding.php +++ b/SecurityCenter/src/V1/Finding.php @@ -365,6 +365,24 @@ class Finding extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.securitycenter.v1.Notebook notebook = 63; */ private $notebook = null; + /** + * Contains details about a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ToxicCombination toxic_combination = 64; + */ + private $toxic_combination = null; + /** + * Contains details about groups of which this finding is a member. A group is + * a collection of findings that are related in some way. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupMembership group_memberships = 65; + */ + private $group_memberships; /** * Constructor. @@ -533,6 +551,16 @@ class Finding extends \Google\Protobuf\Internal\Message * Fields related to Cloud Armor findings. * @type \Google\Cloud\SecurityCenter\V1\Notebook $notebook * Notebook associated with the finding. + * @type \Google\Cloud\SecurityCenter\V1\ToxicCombination $toxic_combination + * Contains details about a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * This field cannot be updated. Its value is ignored in all update requests. + * @type array<\Google\Cloud\SecurityCenter\V1\GroupMembership>|\Google\Protobuf\Internal\RepeatedField $group_memberships + * Contains details about groups of which this finding is a member. A group is + * a collection of findings that are related in some way. + * This field cannot be updated. Its value is ignored in all update requests. * } */ public function __construct($data = NULL) { @@ -2064,5 +2092,79 @@ public function setNotebook($var) return $this; } + /** + * Contains details about a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ToxicCombination toxic_combination = 64; + * @return \Google\Cloud\SecurityCenter\V1\ToxicCombination|null + */ + public function getToxicCombination() + { + return $this->toxic_combination; + } + + public function hasToxicCombination() + { + return isset($this->toxic_combination); + } + + public function clearToxicCombination() + { + unset($this->toxic_combination); + } + + /** + * Contains details about a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.ToxicCombination toxic_combination = 64; + * @param \Google\Cloud\SecurityCenter\V1\ToxicCombination $var + * @return $this + */ + public function setToxicCombination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\ToxicCombination::class); + $this->toxic_combination = $var; + + return $this; + } + + /** + * Contains details about groups of which this finding is a member. A group is + * a collection of findings that are related in some way. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupMembership group_memberships = 65; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupMemberships() + { + return $this->group_memberships; + } + + /** + * Contains details about groups of which this finding is a member. A group is + * a collection of findings that are related in some way. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v1.GroupMembership group_memberships = 65; + * @param array<\Google\Cloud\SecurityCenter\V1\GroupMembership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V1\GroupMembership::class); + $this->group_memberships = $arr; + + return $this; + } + } diff --git a/SecurityCenter/src/V1/Finding/FindingClass.php b/SecurityCenter/src/V1/Finding/FindingClass.php index 3f79817c85fe..d26244482636 100644 --- a/SecurityCenter/src/V1/Finding/FindingClass.php +++ b/SecurityCenter/src/V1/Finding/FindingClass.php @@ -58,6 +58,15 @@ class FindingClass * Generated from protobuf enum POSTURE_VIOLATION = 6; */ const POSTURE_VIOLATION = 6; + /** + * Describes a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * + * Generated from protobuf enum TOXIC_COMBINATION = 7; + */ + const TOXIC_COMBINATION = 7; private static $valueToName = [ self::FINDING_CLASS_UNSPECIFIED => 'FINDING_CLASS_UNSPECIFIED', @@ -67,6 +76,7 @@ class FindingClass self::OBSERVATION => 'OBSERVATION', self::SCC_ERROR => 'SCC_ERROR', self::POSTURE_VIOLATION => 'POSTURE_VIOLATION', + self::TOXIC_COMBINATION => 'TOXIC_COMBINATION', ]; public static function name($value) diff --git a/SecurityCenter/src/V1/GroupMembership.php b/SecurityCenter/src/V1/GroupMembership.php new file mode 100644 index 000000000000..c98c282d36e7 --- /dev/null +++ b/SecurityCenter/src/V1/GroupMembership.php @@ -0,0 +1,102 @@ +google.cloud.securitycenter.v1.GroupMembership + */ +class GroupMembership extends \Google\Protobuf\Internal\Message +{ + /** + * Type of group. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.GroupMembership.GroupType group_type = 1; + */ + private $group_type = 0; + /** + * ID of the group. + * + * Generated from protobuf field string group_id = 2; + */ + private $group_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $group_type + * Type of group. + * @type string $group_id + * ID of the group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\GroupMembership::initOnce(); + parent::__construct($data); + } + + /** + * Type of group. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.GroupMembership.GroupType group_type = 1; + * @return int + */ + public function getGroupType() + { + return $this->group_type; + } + + /** + * Type of group. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.GroupMembership.GroupType group_type = 1; + * @param int $var + * @return $this + */ + public function setGroupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\GroupMembership\GroupType::class); + $this->group_type = $var; + + return $this; + } + + /** + * ID of the group. + * + * Generated from protobuf field string group_id = 2; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * ID of the group. + * + * Generated from protobuf field string group_id = 2; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/GroupMembership/GroupType.php b/SecurityCenter/src/V1/GroupMembership/GroupType.php new file mode 100644 index 000000000000..1aba0208c8ac --- /dev/null +++ b/SecurityCenter/src/V1/GroupMembership/GroupType.php @@ -0,0 +1,57 @@ +google.cloud.securitycenter.v1.GroupMembership.GroupType + */ +class GroupType +{ + /** + * Default value. + * + * Generated from protobuf enum GROUP_TYPE_UNSPECIFIED = 0; + */ + const GROUP_TYPE_UNSPECIFIED = 0; + /** + * Group represents a toxic combination. + * + * Generated from protobuf enum GROUP_TYPE_TOXIC_COMBINATION = 1; + */ + const GROUP_TYPE_TOXIC_COMBINATION = 1; + + private static $valueToName = [ + self::GROUP_TYPE_UNSPECIFIED => 'GROUP_TYPE_UNSPECIFIED', + self::GROUP_TYPE_TOXIC_COMBINATION => 'GROUP_TYPE_TOXIC_COMBINATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupType::class, \Google\Cloud\SecurityCenter\V1\GroupMembership_GroupType::class); + diff --git a/SecurityCenter/src/V1/ToxicCombination.php b/SecurityCenter/src/V1/ToxicCombination.php new file mode 100644 index 000000000000..aba52ba409bc --- /dev/null +++ b/SecurityCenter/src/V1/ToxicCombination.php @@ -0,0 +1,123 @@ +google.cloud.securitycenter.v1.ToxicCombination + */ +class ToxicCombination extends \Google\Protobuf\Internal\Message +{ + /** + * The + * [Attack exposure + * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + * of this toxic combination. The score is a measure of how much this toxic + * combination exposes one or more high-value resources to potential attack. + * + * Generated from protobuf field double attack_exposure_score = 1; + */ + private $attack_exposure_score = 0.0; + /** + * List of resource names of findings associated with this toxic combination. + * For example, `organizations/123/sources/456/findings/789`. + * + * Generated from protobuf field repeated string related_findings = 2; + */ + private $related_findings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $attack_exposure_score + * The + * [Attack exposure + * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + * of this toxic combination. The score is a measure of how much this toxic + * combination exposes one or more high-value resources to potential attack. + * @type array|\Google\Protobuf\Internal\RepeatedField $related_findings + * List of resource names of findings associated with this toxic combination. + * For example, `organizations/123/sources/456/findings/789`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\ToxicCombination::initOnce(); + parent::__construct($data); + } + + /** + * The + * [Attack exposure + * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + * of this toxic combination. The score is a measure of how much this toxic + * combination exposes one or more high-value resources to potential attack. + * + * Generated from protobuf field double attack_exposure_score = 1; + * @return float + */ + public function getAttackExposureScore() + { + return $this->attack_exposure_score; + } + + /** + * The + * [Attack exposure + * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + * of this toxic combination. The score is a measure of how much this toxic + * combination exposes one or more high-value resources to potential attack. + * + * Generated from protobuf field double attack_exposure_score = 1; + * @param float $var + * @return $this + */ + public function setAttackExposureScore($var) + { + GPBUtil::checkDouble($var); + $this->attack_exposure_score = $var; + + return $this; + } + + /** + * List of resource names of findings associated with this toxic combination. + * For example, `organizations/123/sources/456/findings/789`. + * + * Generated from protobuf field repeated string related_findings = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedFindings() + { + return $this->related_findings; + } + + /** + * List of resource names of findings associated with this toxic combination. + * For example, `organizations/123/sources/456/findings/789`. + * + * Generated from protobuf field repeated string related_findings = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedFindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->related_findings = $arr; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V2/Finding.php b/SecurityCenter/src/V2/Finding.php index b990eedcc63c..0407a4a9fed4 100644 --- a/SecurityCenter/src/V2/Finding.php +++ b/SecurityCenter/src/V2/Finding.php @@ -381,6 +381,24 @@ class Finding extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.securitycenter.v2.LoadBalancer load_balancers = 50; */ private $load_balancers; + /** + * Contains details about a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field .google.cloud.securitycenter.v2.ToxicCombination toxic_combination = 56; + */ + private $toxic_combination = null; + /** + * Contains details about groups of which this finding is a member. A group is + * a collection of findings that are related in some way. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v2.GroupMembership group_memberships = 57; + */ + private $group_memberships; /** * Constructor. @@ -569,6 +587,16 @@ class Finding extends \Google\Protobuf\Internal\Message * Log entries that are relevant to the finding. * @type array<\Google\Cloud\SecurityCenter\V2\LoadBalancer>|\Google\Protobuf\Internal\RepeatedField $load_balancers * The load balancers associated with the finding. + * @type \Google\Cloud\SecurityCenter\V2\ToxicCombination $toxic_combination + * Contains details about a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * This field cannot be updated. Its value is ignored in all update requests. + * @type array<\Google\Cloud\SecurityCenter\V2\GroupMembership>|\Google\Protobuf\Internal\RepeatedField $group_memberships + * Contains details about groups of which this finding is a member. A group is + * a collection of findings that are related in some way. + * This field cannot be updated. Its value is ignored in all update requests. * } */ public function __construct($data = NULL) { @@ -2108,5 +2136,79 @@ public function setLoadBalancers($var) return $this; } + /** + * Contains details about a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field .google.cloud.securitycenter.v2.ToxicCombination toxic_combination = 56; + * @return \Google\Cloud\SecurityCenter\V2\ToxicCombination|null + */ + public function getToxicCombination() + { + return $this->toxic_combination; + } + + public function hasToxicCombination() + { + return isset($this->toxic_combination); + } + + public function clearToxicCombination() + { + unset($this->toxic_combination); + } + + /** + * Contains details about a group of security issues that, when the issues + * occur together, represent a greater risk than when the issues occur + * independently. A group of such issues is referred to as a toxic + * combination. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field .google.cloud.securitycenter.v2.ToxicCombination toxic_combination = 56; + * @param \Google\Cloud\SecurityCenter\V2\ToxicCombination $var + * @return $this + */ + public function setToxicCombination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V2\ToxicCombination::class); + $this->toxic_combination = $var; + + return $this; + } + + /** + * Contains details about groups of which this finding is a member. A group is + * a collection of findings that are related in some way. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v2.GroupMembership group_memberships = 57; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupMemberships() + { + return $this->group_memberships; + } + + /** + * Contains details about groups of which this finding is a member. A group is + * a collection of findings that are related in some way. + * This field cannot be updated. Its value is ignored in all update requests. + * + * Generated from protobuf field repeated .google.cloud.securitycenter.v2.GroupMembership group_memberships = 57; + * @param array<\Google\Cloud\SecurityCenter\V2\GroupMembership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecurityCenter\V2\GroupMembership::class); + $this->group_memberships = $arr; + + return $this; + } + } diff --git a/SecurityCenter/src/V2/Finding/FindingClass.php b/SecurityCenter/src/V2/Finding/FindingClass.php index 6c7ecf64e1af..371e6709d428 100644 --- a/SecurityCenter/src/V2/Finding/FindingClass.php +++ b/SecurityCenter/src/V2/Finding/FindingClass.php @@ -58,6 +58,13 @@ class FindingClass * Generated from protobuf enum POSTURE_VIOLATION = 6; */ const POSTURE_VIOLATION = 6; + /** + * Describes a combination of security issues that represent a more severe + * security problem when taken together. + * + * Generated from protobuf enum TOXIC_COMBINATION = 7; + */ + const TOXIC_COMBINATION = 7; private static $valueToName = [ self::FINDING_CLASS_UNSPECIFIED => 'FINDING_CLASS_UNSPECIFIED', @@ -67,6 +74,7 @@ class FindingClass self::OBSERVATION => 'OBSERVATION', self::SCC_ERROR => 'SCC_ERROR', self::POSTURE_VIOLATION => 'POSTURE_VIOLATION', + self::TOXIC_COMBINATION => 'TOXIC_COMBINATION', ]; public static function name($value) diff --git a/SecurityCenter/src/V2/GroupMembership.php b/SecurityCenter/src/V2/GroupMembership.php new file mode 100644 index 000000000000..25066adb053b --- /dev/null +++ b/SecurityCenter/src/V2/GroupMembership.php @@ -0,0 +1,102 @@ +google.cloud.securitycenter.v2.GroupMembership + */ +class GroupMembership extends \Google\Protobuf\Internal\Message +{ + /** + * Type of group. + * + * Generated from protobuf field .google.cloud.securitycenter.v2.GroupMembership.GroupType group_type = 1; + */ + private $group_type = 0; + /** + * ID of the group. + * + * Generated from protobuf field string group_id = 2; + */ + private $group_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $group_type + * Type of group. + * @type string $group_id + * ID of the group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V2\GroupMembership::initOnce(); + parent::__construct($data); + } + + /** + * Type of group. + * + * Generated from protobuf field .google.cloud.securitycenter.v2.GroupMembership.GroupType group_type = 1; + * @return int + */ + public function getGroupType() + { + return $this->group_type; + } + + /** + * Type of group. + * + * Generated from protobuf field .google.cloud.securitycenter.v2.GroupMembership.GroupType group_type = 1; + * @param int $var + * @return $this + */ + public function setGroupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V2\GroupMembership\GroupType::class); + $this->group_type = $var; + + return $this; + } + + /** + * ID of the group. + * + * Generated from protobuf field string group_id = 2; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * ID of the group. + * + * Generated from protobuf field string group_id = 2; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V2/GroupMembership/GroupType.php b/SecurityCenter/src/V2/GroupMembership/GroupType.php new file mode 100644 index 000000000000..669e285de554 --- /dev/null +++ b/SecurityCenter/src/V2/GroupMembership/GroupType.php @@ -0,0 +1,57 @@ +google.cloud.securitycenter.v2.GroupMembership.GroupType + */ +class GroupType +{ + /** + * Default value. + * + * Generated from protobuf enum GROUP_TYPE_UNSPECIFIED = 0; + */ + const GROUP_TYPE_UNSPECIFIED = 0; + /** + * Group represents a toxic combination. + * + * Generated from protobuf enum GROUP_TYPE_TOXIC_COMBINATION = 1; + */ + const GROUP_TYPE_TOXIC_COMBINATION = 1; + + private static $valueToName = [ + self::GROUP_TYPE_UNSPECIFIED => 'GROUP_TYPE_UNSPECIFIED', + self::GROUP_TYPE_TOXIC_COMBINATION => 'GROUP_TYPE_TOXIC_COMBINATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupType::class, \Google\Cloud\SecurityCenter\V2\GroupMembership_GroupType::class); + diff --git a/SecurityCenter/src/V2/ToxicCombination.php b/SecurityCenter/src/V2/ToxicCombination.php new file mode 100644 index 000000000000..84cbc87c500b --- /dev/null +++ b/SecurityCenter/src/V2/ToxicCombination.php @@ -0,0 +1,124 @@ +google.cloud.securitycenter.v2.ToxicCombination + */ +class ToxicCombination extends \Google\Protobuf\Internal\Message +{ + /** + * The + * [Attack exposure + * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + * of this toxic combination. The score is a measure of how much this toxic + * combination exposes one or more high-value resources to potential attack. + * + * Generated from protobuf field double attack_exposure_score = 1; + */ + private $attack_exposure_score = 0.0; + /** + * List of resource names of findings associated with this toxic combination. + * For example, `organizations/123/sources/456/findings/789`. + * + * Generated from protobuf field repeated string related_findings = 2; + */ + private $related_findings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $attack_exposure_score + * The + * [Attack exposure + * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + * of this toxic combination. The score is a measure of how much this toxic + * combination exposes one or more high-value resources to potential attack. + * @type array|\Google\Protobuf\Internal\RepeatedField $related_findings + * List of resource names of findings associated with this toxic combination. + * For example, `organizations/123/sources/456/findings/789`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V2\ToxicCombination::initOnce(); + parent::__construct($data); + } + + /** + * The + * [Attack exposure + * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + * of this toxic combination. The score is a measure of how much this toxic + * combination exposes one or more high-value resources to potential attack. + * + * Generated from protobuf field double attack_exposure_score = 1; + * @return float + */ + public function getAttackExposureScore() + { + return $this->attack_exposure_score; + } + + /** + * The + * [Attack exposure + * score](https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_exposure_scores) + * of this toxic combination. The score is a measure of how much this toxic + * combination exposes one or more high-value resources to potential attack. + * + * Generated from protobuf field double attack_exposure_score = 1; + * @param float $var + * @return $this + */ + public function setAttackExposureScore($var) + { + GPBUtil::checkDouble($var); + $this->attack_exposure_score = $var; + + return $this; + } + + /** + * List of resource names of findings associated with this toxic combination. + * For example, `organizations/123/sources/456/findings/789`. + * + * Generated from protobuf field repeated string related_findings = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedFindings() + { + return $this->related_findings; + } + + /** + * List of resource names of findings associated with this toxic combination. + * For example, `organizations/123/sources/456/findings/789`. + * + * Generated from protobuf field repeated string related_findings = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedFindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->related_findings = $arr; + + return $this; + } + +} +