From 06be47c5a18ccec2953962672e4cebe5c7735f6f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:43:04 -0700 Subject: [PATCH] feat: Add cloud_armor field to finding's list of attributes (#7242) PiperOrigin-RevId: 625555619 Source-Link: https://github.com/googleapis/googleapis/commit/42c6f0016d1331765f99d7e51fdfb29e09335c04 Source-Link: https://github.com/googleapis/googleapis-gen/commit/113f042d116f4388434de0e7d4116bd89ef769c3 Copy-Tag: eyJwIjoiU2VjdXJpdHlDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6IjExM2YwNDJkMTE2ZjQzODg0MzRkZTBlN2Q0MTE2YmQ4OWVmNzY5YzMifQ== --- SecurityCenter/metadata/V1/CloudArmor.php | 54 ++++ SecurityCenter/metadata/V1/Finding.php | Bin 7948 -> 8139 bytes SecurityCenter/src/V1/AdaptiveProtection.php | 84 +++++ SecurityCenter/src/V1/Attack.php | 135 ++++++++ SecurityCenter/src/V1/CloudArmor.php | 323 +++++++++++++++++++ SecurityCenter/src/V1/Finding.php | 44 +++ SecurityCenter/src/V1/Requests.php | 177 ++++++++++ SecurityCenter/src/V1/SecurityPolicy.php | 149 +++++++++ 8 files changed, 966 insertions(+) create mode 100644 SecurityCenter/metadata/V1/CloudArmor.php create mode 100644 SecurityCenter/src/V1/AdaptiveProtection.php create mode 100644 SecurityCenter/src/V1/Attack.php create mode 100644 SecurityCenter/src/V1/CloudArmor.php create mode 100644 SecurityCenter/src/V1/Requests.php create mode 100644 SecurityCenter/src/V1/SecurityPolicy.php diff --git a/SecurityCenter/metadata/V1/CloudArmor.php b/SecurityCenter/metadata/V1/CloudArmor.php new file mode 100644 index 000000000000..1831a22fd0be --- /dev/null +++ b/SecurityCenter/metadata/V1/CloudArmor.php @@ -0,0 +1,54 @@ +internalAddGeneratedFile( + ' + +0google/cloud/securitycenter/v1/cloud_armor.protogoogle.cloud.securitycenter.v1" + +CloudArmorG +security_policy ( 2..google.cloud.securitycenter.v1.SecurityPolicy: +requests ( 2(.google.cloud.securitycenter.v1.RequestsO +adaptive_protection ( 22.google.cloud.securitycenter.v1.AdaptiveProtection6 +attack ( 2&.google.cloud.securitycenter.v1.Attack + threat_vector ( + +duration ( 2.google.protobuf.Duration"= +SecurityPolicy +name (  +type (  +preview ("j +Requests +ratio ( +short_term_allowed ( +long_term_allowed ( +long_term_denied ("( +AdaptiveProtection + +confidence ("H +Attack + +volume_pps ( + +volume_bps ( +classification ( B +"com.google.cloud.securitycenter.v1BCloudArmorProtoPZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpbGoogle.Cloud.SecurityCenter.V1Google\\Cloud\\SecurityCenter\\V1!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/SecurityCenter/metadata/V1/Finding.php b/SecurityCenter/metadata/V1/Finding.php index a9d14dc3739cf71c68e7bad14743661c230d490b..ee34cc1657bc5ebf6a3894fe218f12467170795e 100644 GIT binary patch delta 102 zcmeCNJ8i$gm6_GCC^x@ovLKVwW(Vdpc9vdEE}h96x#cHj@lL+Rb!+lwUWLgQxY<|} zLCQ9-Q10=v@<5 diff --git a/SecurityCenter/src/V1/AdaptiveProtection.php b/SecurityCenter/src/V1/AdaptiveProtection.php new file mode 100644 index 000000000000..b713bf04f0c7 --- /dev/null +++ b/SecurityCenter/src/V1/AdaptiveProtection.php @@ -0,0 +1,84 @@ +google.cloud.securitycenter.v1.AdaptiveProtection + */ +class AdaptiveProtection extends \Google\Protobuf\Internal\Message +{ + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + */ + private $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $confidence + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkDouble($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/Attack.php b/SecurityCenter/src/V1/Attack.php new file mode 100644 index 000000000000..e6edb1e67b03 --- /dev/null +++ b/SecurityCenter/src/V1/Attack.php @@ -0,0 +1,135 @@ +google.cloud.securitycenter.v1.Attack + */ +class Attack extends \Google\Protobuf\Internal\Message +{ + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + */ + private $volume_pps = 0; + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + */ + private $volume_bps = 0; + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + */ + private $classification = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $volume_pps + * Total PPS (packets per second) volume of attack. + * @type int $volume_bps + * Total BPS (bytes per second) volume of attack. + * @type string $classification + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + * @return int + */ + public function getVolumePps() + { + return $this->volume_pps; + } + + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + * @param int $var + * @return $this + */ + public function setVolumePps($var) + { + GPBUtil::checkInt32($var); + $this->volume_pps = $var; + + return $this; + } + + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + * @return int + */ + public function getVolumeBps() + { + return $this->volume_bps; + } + + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + * @param int $var + * @return $this + */ + public function setVolumeBps($var) + { + GPBUtil::checkInt32($var); + $this->volume_bps = $var; + + return $this; + } + + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + * @return string + */ + public function getClassification() + { + return $this->classification; + } + + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + * @param string $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkString($var, True); + $this->classification = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/CloudArmor.php b/SecurityCenter/src/V1/CloudArmor.php new file mode 100644 index 000000000000..2105262a4baf --- /dev/null +++ b/SecurityCenter/src/V1/CloudArmor.php @@ -0,0 +1,323 @@ +google.cloud.securitycenter.v1.CloudArmor + */ +class CloudArmor extends \Google\Protobuf\Internal\Message +{ + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + */ + private $security_policy = null; + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + */ + private $requests = null; + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + */ + private $adaptive_protection = null; + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + */ + private $attack = null; + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4” for Layer 3 and Layer 4 DDoS + * attacks, or “L_7” for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + */ + private $threat_vector = ''; + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + */ + private $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\SecurityPolicy $security_policy + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * @type \Google\Cloud\SecurityCenter\V1\Requests $requests + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * @type \Google\Cloud\SecurityCenter\V1\AdaptiveProtection $adaptive_protection + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * @type \Google\Cloud\SecurityCenter\V1\Attack $attack + * Information about DDoS attack volume and classification. + * @type string $threat_vector + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4” for Layer 3 and Layer 4 DDoS + * attacks, or “L_7” for Layer 7 DDoS attacks. + * @type \Google\Protobuf\Duration $duration + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + * @return \Google\Cloud\SecurityCenter\V1\SecurityPolicy|null + */ + public function getSecurityPolicy() + { + return $this->security_policy; + } + + public function hasSecurityPolicy() + { + return isset($this->security_policy); + } + + public function clearSecurityPolicy() + { + unset($this->security_policy); + } + + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + * @param \Google\Cloud\SecurityCenter\V1\SecurityPolicy $var + * @return $this + */ + public function setSecurityPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityPolicy::class); + $this->security_policy = $var; + + return $this; + } + + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + * @return \Google\Cloud\SecurityCenter\V1\Requests|null + */ + public function getRequests() + { + return $this->requests; + } + + public function hasRequests() + { + return isset($this->requests); + } + + public function clearRequests() + { + unset($this->requests); + } + + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + * @param \Google\Cloud\SecurityCenter\V1\Requests $var + * @return $this + */ + public function setRequests($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Requests::class); + $this->requests = $var; + + return $this; + } + + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + * @return \Google\Cloud\SecurityCenter\V1\AdaptiveProtection|null + */ + public function getAdaptiveProtection() + { + return $this->adaptive_protection; + } + + public function hasAdaptiveProtection() + { + return isset($this->adaptive_protection); + } + + public function clearAdaptiveProtection() + { + unset($this->adaptive_protection); + } + + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + * @param \Google\Cloud\SecurityCenter\V1\AdaptiveProtection $var + * @return $this + */ + public function setAdaptiveProtection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\AdaptiveProtection::class); + $this->adaptive_protection = $var; + + return $this; + } + + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + * @return \Google\Cloud\SecurityCenter\V1\Attack|null + */ + public function getAttack() + { + return $this->attack; + } + + public function hasAttack() + { + return isset($this->attack); + } + + public function clearAttack() + { + unset($this->attack); + } + + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + * @param \Google\Cloud\SecurityCenter\V1\Attack $var + * @return $this + */ + public function setAttack($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Attack::class); + $this->attack = $var; + + return $this; + } + + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4” for Layer 3 and Layer 4 DDoS + * attacks, or “L_7” for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + * @return string + */ + public function getThreatVector() + { + return $this->threat_vector; + } + + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4” for Layer 3 and Layer 4 DDoS + * attacks, or “L_7” for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + * @param string $var + * @return $this + */ + public function setThreatVector($var) + { + GPBUtil::checkString($var, True); + $this->threat_vector = $var; + + return $this; + } + + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/Finding.php b/SecurityCenter/src/V1/Finding.php index b01b12f0aa60..8a8361b76953 100644 --- a/SecurityCenter/src/V1/Finding.php +++ b/SecurityCenter/src/V1/Finding.php @@ -353,6 +353,12 @@ class Finding extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.securitycenter.v1.LoadBalancer load_balancers = 58; */ private $load_balancers; + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + */ + private $cloud_armor = null; /** * Notebook associated with the finding. * @@ -523,6 +529,8 @@ class Finding extends \Google\Protobuf\Internal\Message * Log entries that are relevant to the finding. * @type array<\Google\Cloud\SecurityCenter\V1\LoadBalancer>|\Google\Protobuf\Internal\RepeatedField $load_balancers * The load balancers associated with the finding. + * @type \Google\Cloud\SecurityCenter\V1\CloudArmor $cloud_armor + * Fields related to Cloud Armor findings. * @type \Google\Cloud\SecurityCenter\V1\Notebook $notebook * Notebook associated with the finding. * } @@ -1984,6 +1992,42 @@ public function setLoadBalancers($var) return $this; } + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + * @return \Google\Cloud\SecurityCenter\V1\CloudArmor|null + */ + public function getCloudArmor() + { + return $this->cloud_armor; + } + + public function hasCloudArmor() + { + return isset($this->cloud_armor); + } + + public function clearCloudArmor() + { + unset($this->cloud_armor); + } + + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + * @param \Google\Cloud\SecurityCenter\V1\CloudArmor $var + * @return $this + */ + public function setCloudArmor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\CloudArmor::class); + $this->cloud_armor = $var; + + return $this; + } + /** * Notebook associated with the finding. * diff --git a/SecurityCenter/src/V1/Requests.php b/SecurityCenter/src/V1/Requests.php new file mode 100644 index 000000000000..b57cc601d293 --- /dev/null +++ b/SecurityCenter/src/V1/Requests.php @@ -0,0 +1,177 @@ +google.cloud.securitycenter.v1.Requests + */ +class Requests extends \Google\Protobuf\Internal\Message +{ + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + */ + private $ratio = 0.0; + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + */ + private $short_term_allowed = 0; + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + */ + private $long_term_allowed = 0; + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + */ + private $long_term_denied = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $ratio + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * @type int $short_term_allowed + * Allowed RPS (requests per second) in the short term. + * @type int $long_term_allowed + * Allowed RPS (requests per second) over the long term. + * @type int $long_term_denied + * Denied RPS (requests per second) over the long term. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + * @return float + */ + public function getRatio() + { + return $this->ratio; + } + + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + * @param float $var + * @return $this + */ + public function setRatio($var) + { + GPBUtil::checkDouble($var); + $this->ratio = $var; + + return $this; + } + + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + * @return int + */ + public function getShortTermAllowed() + { + return $this->short_term_allowed; + } + + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + * @param int $var + * @return $this + */ + public function setShortTermAllowed($var) + { + GPBUtil::checkInt32($var); + $this->short_term_allowed = $var; + + return $this; + } + + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + * @return int + */ + public function getLongTermAllowed() + { + return $this->long_term_allowed; + } + + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + * @param int $var + * @return $this + */ + public function setLongTermAllowed($var) + { + GPBUtil::checkInt32($var); + $this->long_term_allowed = $var; + + return $this; + } + + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + * @return int + */ + public function getLongTermDenied() + { + return $this->long_term_denied; + } + + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + * @param int $var + * @return $this + */ + public function setLongTermDenied($var) + { + GPBUtil::checkInt32($var); + $this->long_term_denied = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/SecurityPolicy.php b/SecurityCenter/src/V1/SecurityPolicy.php new file mode 100644 index 000000000000..a47a6c721a47 --- /dev/null +++ b/SecurityCenter/src/V1/SecurityPolicy.php @@ -0,0 +1,149 @@ +google.cloud.securitycenter.v1.SecurityPolicy + */ +class SecurityPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + */ + private $name = ''; + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + */ + private $type = ''; + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + */ + private $preview = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * @type string $type + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * @type bool $preview + * Whether or not the associated rule or policy is in preview mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + * @return bool + */ + public function getPreview() + { + return $this->preview; + } + + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + * @param bool $var + * @return $this + */ + public function setPreview($var) + { + GPBUtil::checkBool($var); + $this->preview = $var; + + return $this; + } + +} +