Class: Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule
- Inherits:
-
Object
- Object
- Google::Apis::ArtifactregistryV1::GoogleDevtoolsArtifactregistryV1Rule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/artifactregistry_v1/classes.rb,
lib/google/apis/artifactregistry_v1/representations.rb,
lib/google/apis/artifactregistry_v1/representations.rb
Overview
A Rule applies to repository or package level. It defines the deny or allow action of the operation when the conditions in the rule are met.
Instance Attribute Summary collapse
-
#action ⇒ String
The action this rule makes.
-
#condition ⇒ Google::Apis::ArtifactregistryV1::Expr
Represents a textual expression in the Common Expression Language (CEL) syntax.
-
#name ⇒ String
The name of the rule, for example: "projects/p1/locations/us-central1/ repositories/repo1/rules/rule1".
-
#operation ⇒ String
Corresponds to the JSON property
operation
. -
#package_id ⇒ String
The package ID the rule applies to.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleDevtoolsArtifactregistryV1Rule
constructor
A new instance of GoogleDevtoolsArtifactregistryV1Rule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleDevtoolsArtifactregistryV1Rule
Returns a new instance of GoogleDevtoolsArtifactregistryV1Rule.
1066 1067 1068 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1066 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ String
The action this rule makes.
Corresponds to the JSON property action
1028 1029 1030 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1028 def action @action end |
#condition ⇒ Google::Apis::ArtifactregistryV1::Expr
Represents a textual expression in the Common Expression Language (CEL) syntax.
CEL is a C-like expression language. The syntax and semantics of CEL are
documented at https://github.com/google/cel-spec. Example (Comparison): title:
"Summary size limit" description: "Determines if a summary is less than 100
chars" expression: "document.summary.size() < 100" Example (Equality): title: "
Requestor is owner" description: "Determines if requestor is the document
owner" expression: "document.owner == request.auth.claims.email" Example (
Logic): title: "Public documents" description: "Determine whether the document
should be publicly visible" expression: "document.type != 'private' &&
document.type != 'internal'" Example (Data Manipulation): title: "Notification
string" description: "Create a notification string with a timestamp."
expression: "'New message received at ' + string(document.create_time)" The
exact variables and functions that may be referenced within an expression are
determined by the service that evaluates it. See the service documentation for
additional information.
Corresponds to the JSON property condition
1047 1048 1049 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1047 def condition @condition end |
#name ⇒ String
The name of the rule, for example: "projects/p1/locations/us-central1/
repositories/repo1/rules/rule1".
Corresponds to the JSON property name
1053 1054 1055 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1053 def name @name end |
#operation ⇒ String
Corresponds to the JSON property operation
1058 1059 1060 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1058 def operation @operation end |
#package_id ⇒ String
The package ID the rule applies to. If empty, this rule applies to all the
packages inside the repository.
Corresponds to the JSON property packageId
1064 1065 1066 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1064 def package_id @package_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1071 1072 1073 1074 1075 1076 1077 |
# File 'lib/google/apis/artifactregistry_v1/classes.rb', line 1071 def update!(**args) @action = args[:action] if args.key?(:action) @condition = args[:condition] if args.key?(:condition) @name = args[:name] if args.key?(:name) @operation = args[:operation] if args.key?(:operation) @package_id = args[:package_id] if args.key?(:package_id) end |