Type of this operation. Contains one of 'add', 'remove', 'replace', 'move',
'copy', 'test' and custom operations. This field is case-insensitive and
always populated.
public MapField<string, Value> PathFilters { get; }
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:
{
"/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.
public MapField<string, ValueMatcher> PathValueMatchers { get; }
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.
Type of GCP resource being modified/tested. This field is always populated.
Example: cloudresourcemanager.googleapis.com/Project,
compute.googleapis.com/Instance
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.
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 = <source> and resource_name = <target>.
This field is empty for all other values of action.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eOperation\u003c/code\u003e class in the Google Cloud Recommender v1 API represents an operation on a resource, supporting actions like 'add', 'remove', 'replace', 'move', 'copy', and 'test', among others.\u003c/p\u003e\n"],["\u003cp\u003eThis class allows for complex modifications of nested arrays, handling partial array patches, and extending operations beyond the standard RFC6902, which can be referenced for more details.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOperation\u003c/code\u003e class offers \u003ccode\u003ePathFilters\u003c/code\u003e and \u003ccode\u003ePathValueMatchers\u003c/code\u003e properties to specify filters for targeting array elements or nested elements with exact or advanced matching criteria.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOperation\u003c/code\u003e class has properties such as \u003ccode\u003eAction\u003c/code\u003e, \u003ccode\u003ePath\u003c/code\u003e, \u003ccode\u003eResource\u003c/code\u003e, and \u003ccode\u003eResourceType\u003c/code\u003e, to describe the operation being performed, the target field, the resource being operated on and its type.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions of the Google.Cloud.Recommender.V1 API available, ranging from the latest 3.7.0 down to version 2.5.0.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Recommender v1 API - Class Operation (3.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.7.0 (latest)](/dotnet/docs/reference/Google.Cloud.Recommender.V1/latest/Google.Cloud.Recommender.V1.Operation)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/3.6.0/Google.Cloud.Recommender.V1.Operation)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/3.5.0/Google.Cloud.Recommender.V1.Operation)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/3.4.0/Google.Cloud.Recommender.V1.Operation)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/3.3.0/Google.Cloud.Recommender.V1.Operation)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/3.2.0/Google.Cloud.Recommender.V1.Operation)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/3.1.0/Google.Cloud.Recommender.V1.Operation)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/3.0.0/Google.Cloud.Recommender.V1.Operation)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/2.8.0/Google.Cloud.Recommender.V1.Operation)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/2.7.0/Google.Cloud.Recommender.V1.Operation)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/2.6.0/Google.Cloud.Recommender.V1.Operation)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Recommender.V1/2.5.0/Google.Cloud.Recommender.V1.Operation) \n\n public sealed class Operation : IMessage\u003cOperation\u003e, IEquatable\u003cOperation\u003e, IDeepCloneable\u003cOperation\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Recommender v1 API class Operation.\n\nContains an operation for a resource loosely based on the JSON-PATCH format\nwith support for:\n\n- Custom filters for describing partial array patch.\n- Extended path values for describing nested arrays.\n- Custom fields for describing the resource for which the operation is being described.\n- Allows extension to custom operations not natively supported by RFC6902. See \u003chttps://tools.ietf.org/html/rfc6902\u003e for details on the original RFC. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Operation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Operation](/dotnet/docs/reference/Google.Cloud.Recommender.V1/latest/Google.Cloud.Recommender.V1.Operation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Operation](/dotnet/docs/reference/Google.Cloud.Recommender.V1/latest/Google.Cloud.Recommender.V1.Operation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Operation](/dotnet/docs/reference/Google.Cloud.Recommender.V1/latest/Google.Cloud.Recommender.V1.Operation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Recommender.V1](/dotnet/docs/reference/Google.Cloud.Recommender.V1/latest/Google.Cloud.Recommender.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Recommender.V1.dll\n\nConstructors\n------------\n\n### Operation()\n\n public Operation()\n\n### Operation(Operation)\n\n public Operation(Operation other)\n\nProperties\n----------\n\n### Action\n\n public string Action { get; set; }\n\nType of this operation. Contains one of 'add', 'remove', 'replace', 'move',\n'copy', 'test' and custom operations. This field is case-insensitive and\nalways populated.\n\n### Path\n\n public string Path { get; set; }\n\nPath to the target field being operated on. If the operation is at the\nresource level, then path should be \"/\". This field is always populated.\n\n### PathFilters\n\n public MapField\u003cstring, Value\u003e PathFilters { get; }\n\nSet of filters to apply if `path` refers to array elements or nested array\nelements in order to narrow down to a single unique element that is being\ntested/modified.\nThis is intended to be an exact match per filter. To perform advanced\nmatching, use path_value_matchers.\n\n- Example: `{\n \"/versions/*/name\" : \"it-123\"\n \"/versions/*/targetSize/percent\": 20\n }`\n- Example: `{\n \"/bindings/*/role\": \"roles/owner\"\n \"/bindings/*/condition\" : null\n }`\n- Example: `{\n \"/bindings/*/role\": \"roles/owner\"\n \"/bindings/*/members/*\" : [\"x@example.com\", \"y@example.com\"]\n }` When both path_filters and path_value_matchers are set, an implicit AND must be performed.\n\n### PathValueCase\n\n public Operation.PathValueOneofCase PathValueCase { get; }\n\n### PathValueMatchers\n\n public MapField\u003cstring, ValueMatcher\u003e PathValueMatchers { get; }\n\nSimilar to path_filters, this contains set of filters to apply if `path`\nfield refers to array elements. This is meant to support value matching\nbeyond exact match. To perform exact match, use path_filters.\nWhen both path_filters and path_value_matchers are set, an implicit AND\nmust be performed.\n\n### Resource\n\n public string Resource { get; set; }\n\nContains the fully qualified resource name. This field is always populated.\nex: //cloudresourcemanager.googleapis.com/projects/foo.\n\n### ResourceType\n\n public string ResourceType { get; set; }\n\nType of GCP resource being modified/tested. This field is always populated.\nExample: cloudresourcemanager.googleapis.com/Project,\ncompute.googleapis.com/Instance\n\n### SourcePath\n\n public string SourcePath { get; set; }\n\nCan be set with action 'copy' or 'move' to indicate the source field within\nresource or source_resource, ignored if provided for other operation types.\n\n### SourceResource\n\n public string SourceResource { get; set; }\n\nCan be set with action 'copy' to copy resource configuration across\ndifferent resources of the same type. Example: A resource clone can be\ndone via action = 'copy', path = \"/\", from = \"/\",\nsource_resource = \\\u003csource\\\u003e and resource_name = \\\u003ctarget\\\u003e.\nThis field is empty for all other values of `action`.\n\n### Value\n\n public Value Value { get; set; }\n\nValue for the `path` field. Will be set for actions:'add'/'replace'.\nMaybe set for action: 'test'. Either this or `value_matcher` will be set\nfor 'test' operation. An exact match must be performed.\n\n### ValueMatcher\n\n public ValueMatcher ValueMatcher { get; set; }\n\nCan be set for action 'test' for advanced matching for the value of\n'path' field. Either this or `value` will be set for 'test' operation."]]