diff --git a/BinaryAuthorization/metadata/V1Beta1/ContinuousValidationLogging.php b/BinaryAuthorization/metadata/V1Beta1/ContinuousValidationLogging.php index ba6c3794d12e..88ee0f9e77f4 100644 Binary files a/BinaryAuthorization/metadata/V1Beta1/ContinuousValidationLogging.php and b/BinaryAuthorization/metadata/V1Beta1/ContinuousValidationLogging.php differ diff --git a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent.php b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent.php index 0c2268c86106..7361b19f9337 100644 --- a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent.php +++ b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent.php @@ -25,8 +25,8 @@ class ContinuousValidationEvent extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent $pod_event * Pod event. - * @type \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\UnsupportedPolicyEvent $unsupported_policy_event - * Unsupported policy event. + * @type \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ConfigErrorEvent $config_error_event + * Config error event. * } */ public function __construct($data = NULL) { @@ -66,32 +66,32 @@ public function setPodEvent($var) } /** - * Unsupported policy event. + * Config error event. * - * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * @return \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\UnsupportedPolicyEvent|null + * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEvent config_error_event = 4; + * @return \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ConfigErrorEvent|null */ - public function getUnsupportedPolicyEvent() + public function getConfigErrorEvent() { - return $this->readOneof(2); + return $this->readOneof(4); } - public function hasUnsupportedPolicyEvent() + public function hasConfigErrorEvent() { - return $this->hasOneof(2); + return $this->hasOneof(4); } /** - * Unsupported policy event. + * Config error event. * - * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * @param \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\UnsupportedPolicyEvent $var + * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEvent config_error_event = 4; + * @param \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ConfigErrorEvent $var * @return $this */ - public function setUnsupportedPolicyEvent($var) + public function setConfigErrorEvent($var) { - GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\UnsupportedPolicyEvent::class); - $this->writeOneof(2, $var); + GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ConfigErrorEvent::class); + $this->writeOneof(4, $var); return $this; } diff --git a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ConfigErrorEvent.php b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ConfigErrorEvent.php new file mode 100644 index 000000000000..b66077cf4c6e --- /dev/null +++ b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ConfigErrorEvent.php @@ -0,0 +1,71 @@ +google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEvent + */ +class ConfigErrorEvent extends \Google\Protobuf\Internal\Message +{ + /** + * A description of the issue. + * + * Generated from protobuf field string description = 1; + */ + private $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * A description of the issue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1Beta1\ContinuousValidationLogging::initOnce(); + parent::__construct($data); + } + + /** + * A description of the issue. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the issue. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConfigErrorEvent::class, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent_ConfigErrorEvent::class); + diff --git a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent.php b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent.php index 3d40faa74264..c052b30161e5 100644 --- a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent.php +++ b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent.php @@ -27,6 +27,12 @@ class ContinuousValidationPodEvent extends \Google\Protobuf\Internal\Message * Generated from protobuf field string pod = 1; */ private $pod = ''; + /** + * The name of the policy. + * + * Generated from protobuf field string policy_name = 8; + */ + private $policy_name = ''; /** * Deploy time of the Pod from k8s. * @@ -62,6 +68,8 @@ class ContinuousValidationPodEvent extends \Google\Protobuf\Internal\Message * The k8s namespace of the Pod. * @type string $pod * The name of the Pod. + * @type string $policy_name + * The name of the policy. * @type \Google\Protobuf\Timestamp $deploy_time * Deploy time of the Pod from k8s. * @type \Google\Protobuf\Timestamp $end_time @@ -129,6 +137,32 @@ public function setPod($var) return $this; } + /** + * The name of the policy. + * + * Generated from protobuf field string policy_name = 8; + * @return string + */ + public function getPolicyName() + { + return $this->policy_name; + } + + /** + * The name of the policy. + * + * Generated from protobuf field string policy_name = 8; + * @param string $var + * @return $this + */ + public function setPolicyName($var) + { + GPBUtil::checkString($var, True); + $this->policy_name = $var; + + return $this; + } + /** * Deploy time of the Pod from k8s. * diff --git a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails.php b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails.php index 8d4fc4de6829..e1f7bc2c0b2a 100644 --- a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails.php +++ b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails.php @@ -33,6 +33,12 @@ class ImageDetails extends \Google\Protobuf\Internal\Message * Generated from protobuf field string description = 3; */ private $description = ''; + /** + * List of check results. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult check_results = 4; + */ + private $check_results; /** * Constructor. @@ -46,6 +52,8 @@ class ImageDetails extends \Google\Protobuf\Internal\Message * The result of the audit for this image. * @type string $description * Description of the above result. + * @type array<\Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails\CheckResult>|\Google\Protobuf\Internal\RepeatedField $check_results + * List of check results. * } */ public function __construct($data = NULL) { @@ -131,6 +139,32 @@ public function setDescription($var) return $this; } + /** + * List of check results. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult check_results = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCheckResults() + { + return $this->check_results; + } + + /** + * List of check results. + * + * Generated from protobuf field repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult check_results = 4; + * @param array<\Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails\CheckResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCheckResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails\CheckResult::class); + $this->check_results = $arr; + + return $this; + } + } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult.php b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult.php new file mode 100644 index 000000000000..c57aa6d6f897 --- /dev/null +++ b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult.php @@ -0,0 +1,316 @@ +google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult + */ +class CheckResult extends \Google\Protobuf\Internal\Message +{ + /** + * The index of the check set. + * + * Generated from protobuf field string check_set_index = 1; + */ + private $check_set_index = ''; + /** + * The name of the check set. + * + * Generated from protobuf field string check_set_name = 2; + */ + private $check_set_name = ''; + /** + * The scope of the check set. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope check_set_scope = 3; + */ + private $check_set_scope = null; + /** + * The index of the check. + * + * Generated from protobuf field string check_index = 4; + */ + private $check_index = ''; + /** + * The name of the check. + * + * Generated from protobuf field string check_name = 5; + */ + private $check_name = ''; + /** + * The type of the check. + * + * Generated from protobuf field string check_type = 6; + */ + private $check_type = ''; + /** + * The verdict of this check. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict verdict = 7; + */ + private $verdict = 0; + /** + * User-friendly explanation of this check result. + * + * Generated from protobuf field string explanation = 8; + */ + private $explanation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $check_set_index + * The index of the check set. + * @type string $check_set_name + * The name of the check set. + * @type \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails\CheckResult\CheckSetScope $check_set_scope + * The scope of the check set. + * @type string $check_index + * The index of the check. + * @type string $check_name + * The name of the check. + * @type string $check_type + * The type of the check. + * @type int $verdict + * The verdict of this check. + * @type string $explanation + * User-friendly explanation of this check result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1Beta1\ContinuousValidationLogging::initOnce(); + parent::__construct($data); + } + + /** + * The index of the check set. + * + * Generated from protobuf field string check_set_index = 1; + * @return string + */ + public function getCheckSetIndex() + { + return $this->check_set_index; + } + + /** + * The index of the check set. + * + * Generated from protobuf field string check_set_index = 1; + * @param string $var + * @return $this + */ + public function setCheckSetIndex($var) + { + GPBUtil::checkString($var, True); + $this->check_set_index = $var; + + return $this; + } + + /** + * The name of the check set. + * + * Generated from protobuf field string check_set_name = 2; + * @return string + */ + public function getCheckSetName() + { + return $this->check_set_name; + } + + /** + * The name of the check set. + * + * Generated from protobuf field string check_set_name = 2; + * @param string $var + * @return $this + */ + public function setCheckSetName($var) + { + GPBUtil::checkString($var, True); + $this->check_set_name = $var; + + return $this; + } + + /** + * The scope of the check set. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope check_set_scope = 3; + * @return \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails\CheckResult\CheckSetScope|null + */ + public function getCheckSetScope() + { + return $this->check_set_scope; + } + + public function hasCheckSetScope() + { + return isset($this->check_set_scope); + } + + public function clearCheckSetScope() + { + unset($this->check_set_scope); + } + + /** + * The scope of the check set. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope check_set_scope = 3; + * @param \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails\CheckResult\CheckSetScope $var + * @return $this + */ + public function setCheckSetScope($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails\CheckResult\CheckSetScope::class); + $this->check_set_scope = $var; + + return $this; + } + + /** + * The index of the check. + * + * Generated from protobuf field string check_index = 4; + * @return string + */ + public function getCheckIndex() + { + return $this->check_index; + } + + /** + * The index of the check. + * + * Generated from protobuf field string check_index = 4; + * @param string $var + * @return $this + */ + public function setCheckIndex($var) + { + GPBUtil::checkString($var, True); + $this->check_index = $var; + + return $this; + } + + /** + * The name of the check. + * + * Generated from protobuf field string check_name = 5; + * @return string + */ + public function getCheckName() + { + return $this->check_name; + } + + /** + * The name of the check. + * + * Generated from protobuf field string check_name = 5; + * @param string $var + * @return $this + */ + public function setCheckName($var) + { + GPBUtil::checkString($var, True); + $this->check_name = $var; + + return $this; + } + + /** + * The type of the check. + * + * Generated from protobuf field string check_type = 6; + * @return string + */ + public function getCheckType() + { + return $this->check_type; + } + + /** + * The type of the check. + * + * Generated from protobuf field string check_type = 6; + * @param string $var + * @return $this + */ + public function setCheckType($var) + { + GPBUtil::checkString($var, True); + $this->check_type = $var; + + return $this; + } + + /** + * The verdict of this check. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict verdict = 7; + * @return int + */ + public function getVerdict() + { + return $this->verdict; + } + + /** + * The verdict of this check. + * + * Generated from protobuf field .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict verdict = 7; + * @param int $var + * @return $this + */ + public function setVerdict($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent\ContinuousValidationPodEvent\ImageDetails\CheckResult\CheckVerdict::class); + $this->verdict = $var; + + return $this; + } + + /** + * User-friendly explanation of this check result. + * + * Generated from protobuf field string explanation = 8; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * User-friendly explanation of this check result. + * + * Generated from protobuf field string explanation = 8; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CheckResult::class, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult::class); + diff --git a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult/CheckSetScope.php b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult/CheckSetScope.php new file mode 100644 index 000000000000..abaf652bfbbf --- /dev/null +++ b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult/CheckSetScope.php @@ -0,0 +1,126 @@ +google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope + */ +class CheckSetScope extends \Google\Protobuf\Internal\Message +{ + protected $scope; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kubernetes_service_account + * Matches a single Kubernetes service account, e.g. + * 'my-namespace:my-service-account'. + * `kubernetes_service_account` scope is always more specific than + * `kubernetes_namespace` scope for the same namespace. + * @type string $kubernetes_namespace + * Matches all Kubernetes service accounts in the provided + * namespace, unless a more specific `kubernetes_service_account` + * scope already matched. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Binaryauthorization\V1Beta1\ContinuousValidationLogging::initOnce(); + parent::__construct($data); + } + + /** + * Matches a single Kubernetes service account, e.g. + * 'my-namespace:my-service-account'. + * `kubernetes_service_account` scope is always more specific than + * `kubernetes_namespace` scope for the same namespace. + * + * Generated from protobuf field string kubernetes_service_account = 1; + * @return string + */ + public function getKubernetesServiceAccount() + { + return $this->readOneof(1); + } + + public function hasKubernetesServiceAccount() + { + return $this->hasOneof(1); + } + + /** + * Matches a single Kubernetes service account, e.g. + * 'my-namespace:my-service-account'. + * `kubernetes_service_account` scope is always more specific than + * `kubernetes_namespace` scope for the same namespace. + * + * Generated from protobuf field string kubernetes_service_account = 1; + * @param string $var + * @return $this + */ + public function setKubernetesServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Matches all Kubernetes service accounts in the provided + * namespace, unless a more specific `kubernetes_service_account` + * scope already matched. + * + * Generated from protobuf field string kubernetes_namespace = 2; + * @return string + */ + public function getKubernetesNamespace() + { + return $this->readOneof(2); + } + + public function hasKubernetesNamespace() + { + return $this->hasOneof(2); + } + + /** + * Matches all Kubernetes service accounts in the provided + * namespace, unless a more specific `kubernetes_service_account` + * scope already matched. + * + * Generated from protobuf field string kubernetes_namespace = 2; + * @param string $var + * @return $this + */ + public function setKubernetesNamespace($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getScope() + { + return $this->whichOneof("scope"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CheckSetScope::class, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult_CheckSetScope::class); + diff --git a/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult/CheckVerdict.php b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult/CheckVerdict.php new file mode 100644 index 000000000000..d73e2891fac3 --- /dev/null +++ b/BinaryAuthorization/src/V1beta1/ContinuousValidationEvent/ContinuousValidationPodEvent/ImageDetails/CheckResult/CheckVerdict.php @@ -0,0 +1,58 @@ +google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict + */ +class CheckVerdict +{ + /** + * We should always have a verdict. This is an error. + * + * Generated from protobuf enum CHECK_VERDICT_UNSPECIFIED = 0; + */ + const CHECK_VERDICT_UNSPECIFIED = 0; + /** + * The check was successfully evaluated and the image did not satisfy + * the check. + * + * Generated from protobuf enum NON_CONFORMANT = 1; + */ + const NON_CONFORMANT = 1; + + private static $valueToName = [ + self::CHECK_VERDICT_UNSPECIFIED => 'CHECK_VERDICT_UNSPECIFIED', + self::NON_CONFORMANT => 'NON_CONFORMANT', + ]; + + 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(CheckVerdict::class, \Google\Cloud\BinaryAuthorization\V1beta1\ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_CheckResult_CheckVerdict::class); +