Class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Operation
- Inherits:
-
Object
- Object
- Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Operation
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/recommender_v1beta1/classes.rb,
lib/google/apis/recommender_v1beta1/representations.rb,
lib/google/apis/recommender_v1beta1/representations.rb
Overview
Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https:// tools.ietf.org/html/rfc6902 for details on the original RFC.
Instance Attribute Summary collapse
-
#action ⇒ String
Type of this operation.
-
#path ⇒ String
Path to the target field being operated on.
-
#path_filters ⇒ Hash<String,Object>
Set of filters to apply if
path
refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. -
#path_value_matchers ⇒ Hash<String,Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher>
Similar to path_filters, this contains set of filters to apply if
path
field refers to array elements. -
#resource ⇒ String
Contains the fully qualified resource name.
-
#resource_type ⇒ String
Type of GCP resource being modified/tested.
-
#source_path ⇒ String
Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.
-
#source_resource ⇒ String
Can be set with action 'copy' to copy resource configuration across different resources of the same type.
-
#value ⇒ Object
Value for the
path
field. -
#value_matcher ⇒ Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher
Contains various matching options for values for a GCP resource field.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRecommenderV1beta1Operation
constructor
A new instance of GoogleCloudRecommenderV1beta1Operation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRecommenderV1beta1Operation
Returns a new instance of GoogleCloudRecommenderV1beta1Operation.
732 733 734 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 732 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ String
Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', '
copy', 'test' and 'custom' operations. This field is case-insensitive and
always populated.
Corresponds to the JSON property action
664 665 666 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 664 def action @action end |
#path ⇒ String
Path to the target field being operated on. If the operation is at the
resource level, then path should be "/". This field is always populated.
Corresponds to the JSON property path
670 671 672 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 670 def path @path end |
#path_filters ⇒ Hash<String,Object>
Set of filters to apply if path
refers to array elements or nested array
elements in order to narrow down to a single unique element that is being
tested/modified. This is intended to be an exact match per filter. To perform
advanced matching, use path_value_matchers. * Example: ` "/versions/*/name"
: "it-123" "/versions/*/targetSize/percent": 20 `
* Example: ` "/
bindings/*/role": "roles/owner" "/bindings/*/condition" : null `
* Example:
` "/bindings/*/role": "roles/owner" "/bindings/*/members/*" : ["x@example.
com", "y@example.com"] `
When both path_filters and path_value_matchers
are set, an implicit AND must be performed.
Corresponds to the JSON property pathFilters
683 684 685 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 683 def path_filters @path_filters end |
#path_value_matchers ⇒ Hash<String,Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher>
Similar to path_filters, this contains set of filters to apply if path
field
refers to array elements. This is meant to support value matching beyond exact
match. To perform exact match, use path_filters. When both path_filters and
path_value_matchers are set, an implicit AND must be performed.
Corresponds to the JSON property pathValueMatchers
691 692 693 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 691 def path_value_matchers @path_value_matchers end |
#resource ⇒ String
Contains the fully qualified resource name. This field is always populated. ex:
//cloudresourcemanager.googleapis.com/projects/foo.
Corresponds to the JSON property resource
697 698 699 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 697 def resource @resource end |
#resource_type ⇒ String
Type of GCP resource being modified/tested. This field is always populated.
Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/
Instance
Corresponds to the JSON property resourceType
704 705 706 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 704 def resource_type @resource_type end |
#source_path ⇒ String
Can be set with action 'copy' or 'move' to indicate the source field within
resource or source_resource, ignored if provided for other operation types.
Corresponds to the JSON property sourcePath
710 711 712 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 710 def source_path @source_path end |
#source_resource ⇒ String
Can be set with action 'copy' to copy resource configuration across different
resources of the same type. Example: A resource clone can be done via action =
'copy', path = "/", from = "/", source_resource = and resource_name = . This
field is empty for all other values of action
.
Corresponds to the JSON property sourceResource
718 719 720 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 718 def source_resource @source_resource end |
#value ⇒ Object
Value for the path
field. Will be set for actions:'add'/'replace'. Maybe set
for action: 'test'. Either this or value_matcher
will be set for 'test'
operation. An exact match must be performed.
Corresponds to the JSON property value
725 726 727 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 725 def value @value end |
#value_matcher ⇒ Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher
Contains various matching options for values for a GCP resource field.
Corresponds to the JSON property valueMatcher
730 731 732 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 730 def value_matcher @value_matcher end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
737 738 739 740 741 742 743 744 745 746 747 748 |
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 737 def update!(**args) @action = args[:action] if args.key?(:action) @path = args[:path] if args.key?(:path) @path_filters = args[:path_filters] if args.key?(:path_filters) @path_value_matchers = args[:path_value_matchers] if args.key?(:path_value_matchers) @resource = args[:resource] if args.key?(:resource) @resource_type = args[:resource_type] if args.key?(:resource_type) @source_path = args[:source_path] if args.key?(:source_path) @source_resource = args[:source_resource] if args.key?(:source_resource) @value = args[:value] if args.key?(:value) @value_matcher = args[:value_matcher] if args.key?(:value_matcher) end |