# Recommender V1 API - Class Google::Cloud::Recommender::V1::Operation (v1.8.0)

1.8.0 (latest) 1.7.0 1.6.1 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.18.0 0.17.2 0.16.0 0.15.0 0.14.0 0.13.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.6 Reference documentation and code samples for the Recommender V1 API class Google::Cloud::Recommender::V1::Operation.

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.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #action

    def action() -> ::String

**Returns**

- (::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.

### #action=

    def action=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #path

    def path() -> ::String

**Returns**

- (::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.

### #path=

    def path=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #path_filters

    def path_filters() -> ::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Protobuf::Value}) --- 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.

### #path_filters=

    def path_filters=(value) -> ::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::Google::Protobuf::Value}) ---

  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.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Protobuf::Value}) --- 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.

### #path_value_matchers

    def path_value_matchers() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Recommender::V1::ValueMatcher}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::Recommender::V1::ValueMatcher}) --- 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.

### #path_value_matchers=

    def path_value_matchers=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Recommender::V1::ValueMatcher}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::Google::Cloud::Recommender::V1::ValueMatcher}) --- 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.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::Recommender::V1::ValueMatcher}) --- 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.

### #resource

    def resource() -> ::String

**Returns**

- (::String) --- Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.

### #resource=

    def resource=(value) -> ::String

**Parameter**

- **value** (::String) --- Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.
**Returns**

- (::String) --- Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.

### #resource_type

    def resource_type() -> ::String

**Returns**

- (::String) --- Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance

### #resource_type=

    def resource_type=(value) -> ::String

**Parameter**

- **value** (::String) --- Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance
**Returns**

- (::String) --- Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance

### #source_path

    def source_path() -> ::String

**Returns**

- (::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_path=

    def source_path=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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

    def source_resource() -> ::String

**Returns**

- (::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 =

### #source_resource=

    def source_resource=(value) -> ::String

**Parameter**

- **value** (::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 =
**Returns**

- (::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 =

### #value

    def value() -> ::Google::Protobuf::Value

**Returns**

- ([::Google::Protobuf::Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Value)) --- 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.


  Note: The following fields are mutually exclusive: `value`, `value_matcher`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #value=

    def value=(value) -> ::Google::Protobuf::Value

**Parameter**

- **value** ([::Google::Protobuf::Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Value)) --- 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.


  Note: The following fields are mutually exclusive: `value`, `value_matcher`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Protobuf::Value](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Value)) --- 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.


  Note: The following fields are mutually exclusive: `value`, `value_matcher`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #value_matcher

    def value_matcher() -> ::Google::Cloud::Recommender::V1::ValueMatcher

**Returns**

- ([::Google::Cloud::Recommender::V1::ValueMatcher](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-ValueMatcher)) --- Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.


  Note: The following fields are mutually exclusive: `value_matcher`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #value_matcher=

    def value_matcher=(value) -> ::Google::Cloud::Recommender::V1::ValueMatcher

**Parameter**

- **value** ([::Google::Cloud::Recommender::V1::ValueMatcher](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-ValueMatcher)) --- Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.


  Note: The following fields are mutually exclusive: `value_matcher`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Recommender::V1::ValueMatcher](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-ValueMatcher)) --- Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation.


  Note: The following fields are mutually exclusive: `value_matcher`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared.