Class Operation.Builder (2.55.0)

public static final class Operation.Builder extends GeneratedMessageV3.Builder<Operation.Builder> implements OperationOrBuilder

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.

Protobuf type google.cloud.recommender.v1beta1.Operation

Implements

OperationOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Operation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Operation.Builder
Overrides

build()

public Operation build()
Returns
Type Description
Operation

buildPartial()

public Operation buildPartial()
Returns
Type Description
Operation

clear()

public Operation.Builder clear()
Returns
Type Description
Operation.Builder
Overrides

clearAction()

public Operation.Builder clearAction()

Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.

string action = 1;

Returns
Type Description
Operation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Operation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Operation.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Operation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Operation.Builder
Overrides

clearPath()

public Operation.Builder clearPath()

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.

string path = 4;

Returns
Type Description
Operation.Builder

This builder for chaining.

clearPathFilters()

public Operation.Builder clearPathFilters()
Returns
Type Description
Operation.Builder

clearPathValue()

public Operation.Builder clearPathValue()
Returns
Type Description
Operation.Builder

clearPathValueMatchers()

public Operation.Builder clearPathValueMatchers()
Returns
Type Description
Operation.Builder

clearResource()

public Operation.Builder clearResource()

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

string resource = 3;

Returns
Type Description
Operation.Builder

This builder for chaining.

clearResourceType()

public Operation.Builder clearResourceType()

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

string resource_type = 2;

Returns
Type Description
Operation.Builder

This builder for chaining.

clearSourcePath()

public Operation.Builder clearSourcePath()

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.

string source_path = 6;

Returns
Type Description
Operation.Builder

This builder for chaining.

clearSourceResource()

public Operation.Builder clearSourceResource()

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.

string source_resource = 5;

Returns
Type Description
Operation.Builder

This builder for chaining.

clearValue()

public Operation.Builder clearValue()

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.

.google.protobuf.Value value = 7;

Returns
Type Description
Operation.Builder

clearValueMatcher()

public Operation.Builder clearValueMatcher()

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.

.google.cloud.recommender.v1beta1.ValueMatcher value_matcher = 10;

Returns
Type Description
Operation.Builder

clone()

public Operation.Builder clone()
Returns
Type Description
Operation.Builder
Overrides

containsPathFilters(String key)

public boolean containsPathFilters(String key)

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.

map<string, .google.protobuf.Value> path_filters = 8;

Parameter
Name Description
key String
Returns
Type Description
boolean

containsPathValueMatchers(String key)

public boolean containsPathValueMatchers(String key)

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAction()

public String getAction()

Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.

string action = 1;

Returns
Type Description
String

The action.

getActionBytes()

public ByteString getActionBytes()

Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.

string action = 1;

Returns
Type Description
ByteString

The bytes for action.

getDefaultInstanceForType()

public Operation getDefaultInstanceForType()
Returns
Type Description
Operation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutablePathFilters() (deprecated)

public Map<String,Value> getMutablePathFilters()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Value>

getMutablePathValueMatchers() (deprecated)

public Map<String,ValueMatcher> getMutablePathValueMatchers()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,ValueMatcher>

getPath()

public String getPath()

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.

string path = 4;

Returns
Type Description
String

The path.

getPathBytes()

public ByteString getPathBytes()

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.

string path = 4;

Returns
Type Description
ByteString

The bytes for path.

getPathFilters() (deprecated)

public Map<String,Value> getPathFilters()

Use #getPathFiltersMap() instead.

Returns
Type Description
Map<String,Value>

getPathFiltersCount()

public int getPathFiltersCount()

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.

map<string, .google.protobuf.Value> path_filters = 8;

Returns
Type Description
int

getPathFiltersMap()

public Map<String,Value> getPathFiltersMap()

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.

map<string, .google.protobuf.Value> path_filters = 8;

Returns
Type Description
Map<String,Value>

getPathFiltersOrDefault(String key, Value defaultValue)

public Value getPathFiltersOrDefault(String key, Value defaultValue)

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.

map<string, .google.protobuf.Value> path_filters = 8;

Parameters
Name Description
key String
defaultValue Value
Returns
Type Description
Value

getPathFiltersOrThrow(String key)

public Value getPathFiltersOrThrow(String key)

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.

map<string, .google.protobuf.Value> path_filters = 8;

Parameter
Name Description
key String
Returns
Type Description
Value

getPathValueCase()

public Operation.PathValueCase getPathValueCase()
Returns
Type Description
Operation.PathValueCase

getPathValueMatchers() (deprecated)

public Map<String,ValueMatcher> getPathValueMatchers()
Returns
Type Description
Map<String,ValueMatcher>

getPathValueMatchersCount()

public int getPathValueMatchersCount()

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Returns
Type Description
int

getPathValueMatchersMap()

public Map<String,ValueMatcher> getPathValueMatchersMap()

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Returns
Type Description
Map<String,ValueMatcher>

getPathValueMatchersOrDefault(String key, ValueMatcher defaultValue)

public ValueMatcher getPathValueMatchersOrDefault(String key, ValueMatcher defaultValue)

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Parameters
Name Description
key String
defaultValue ValueMatcher
Returns
Type Description
ValueMatcher

getPathValueMatchersOrThrow(String key)

public ValueMatcher getPathValueMatchersOrThrow(String key)

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Parameter
Name Description
key String
Returns
Type Description
ValueMatcher

getResource()

public String getResource()

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

string resource = 3;

Returns
Type Description
String

The resource.

getResourceBytes()

public ByteString getResourceBytes()

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

string resource = 3;

Returns
Type Description
ByteString

The bytes for resource.

getResourceType()

public String getResourceType()

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

string resource_type = 2;

Returns
Type Description
String

The resourceType.

getResourceTypeBytes()

public ByteString getResourceTypeBytes()

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

string resource_type = 2;

Returns
Type Description
ByteString

The bytes for resourceType.

getSourcePath()

public String getSourcePath()

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.

string source_path = 6;

Returns
Type Description
String

The sourcePath.

getSourcePathBytes()

public ByteString getSourcePathBytes()

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.

string source_path = 6;

Returns
Type Description
ByteString

The bytes for sourcePath.

getSourceResource()

public String getSourceResource()

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.

string source_resource = 5;

Returns
Type Description
String

The sourceResource.

getSourceResourceBytes()

public ByteString getSourceResourceBytes()

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.

string source_resource = 5;

Returns
Type Description
ByteString

The bytes for sourceResource.

getValue()

public Value getValue()

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.

.google.protobuf.Value value = 7;

Returns
Type Description
Value

The value.

getValueBuilder()

public Value.Builder getValueBuilder()

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.

.google.protobuf.Value value = 7;

Returns
Type Description
Builder

getValueMatcher()

public ValueMatcher getValueMatcher()

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.

.google.cloud.recommender.v1beta1.ValueMatcher value_matcher = 10;

Returns
Type Description
ValueMatcher

The valueMatcher.

getValueMatcherBuilder()

public ValueMatcher.Builder getValueMatcherBuilder()

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.

.google.cloud.recommender.v1beta1.ValueMatcher value_matcher = 10;

Returns
Type Description
ValueMatcher.Builder

getValueMatcherOrBuilder()

public ValueMatcherOrBuilder getValueMatcherOrBuilder()

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.

.google.cloud.recommender.v1beta1.ValueMatcher value_matcher = 10;

Returns
Type Description
ValueMatcherOrBuilder

getValueOrBuilder()

public ValueOrBuilder getValueOrBuilder()

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.

.google.protobuf.Value value = 7;

Returns
Type Description
ValueOrBuilder

hasValue()

public boolean hasValue()

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.

.google.protobuf.Value value = 7;

Returns
Type Description
boolean

Whether the value field is set.

hasValueMatcher()

public boolean hasValueMatcher()

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.

.google.cloud.recommender.v1beta1.ValueMatcher value_matcher = 10;

Returns
Type Description
boolean

Whether the valueMatcher field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Operation other)

public Operation.Builder mergeFrom(Operation other)
Parameter
Name Description
other Operation
Returns
Type Description
Operation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Operation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Operation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Operation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Operation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Operation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Operation.Builder
Overrides

mergeValue(Value value)

public Operation.Builder mergeValue(Value 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.

.google.protobuf.Value value = 7;

Parameter
Name Description
value Value
Returns
Type Description
Operation.Builder

mergeValueMatcher(ValueMatcher value)

public Operation.Builder mergeValueMatcher(ValueMatcher value)

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.

.google.cloud.recommender.v1beta1.ValueMatcher value_matcher = 10;

Parameter
Name Description
value ValueMatcher
Returns
Type Description
Operation.Builder

putAllPathFilters(Map<String,Value> values)

public Operation.Builder putAllPathFilters(Map<String,Value> values)

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.

map<string, .google.protobuf.Value> path_filters = 8;

Parameter
Name Description
values Map<String,Value>
Returns
Type Description
Operation.Builder

putAllPathValueMatchers(Map<String,ValueMatcher> values)

public Operation.Builder putAllPathValueMatchers(Map<String,ValueMatcher> values)

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Parameter
Name Description
values Map<String,ValueMatcher>
Returns
Type Description
Operation.Builder

putPathFilters(String key, Value value)

public Operation.Builder putPathFilters(String key, Value 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.

map<string, .google.protobuf.Value> path_filters = 8;

Parameters
Name Description
key String
value Value
Returns
Type Description
Operation.Builder

putPathFiltersBuilderIfAbsent(String key)

public Value.Builder putPathFiltersBuilderIfAbsent(String key)

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.

map<string, .google.protobuf.Value> path_filters = 8;

Parameter
Name Description
key String
Returns
Type Description
Builder

putPathValueMatchers(String key, ValueMatcher value)

public Operation.Builder putPathValueMatchers(String key, ValueMatcher value)

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Parameters
Name Description
key String
value ValueMatcher
Returns
Type Description
Operation.Builder

putPathValueMatchersBuilderIfAbsent(String key)

public ValueMatcher.Builder putPathValueMatchersBuilderIfAbsent(String key)

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Parameter
Name Description
key String
Returns
Type Description
ValueMatcher.Builder

removePathFilters(String key)

public Operation.Builder removePathFilters(String key)

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.

map<string, .google.protobuf.Value> path_filters = 8;

Parameter
Name Description
key String
Returns
Type Description
Operation.Builder

removePathValueMatchers(String key)

public Operation.Builder removePathValueMatchers(String key)

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.

map<string, .google.cloud.recommender.v1beta1.ValueMatcher> path_value_matchers = 11;

Parameter
Name Description
key String
Returns
Type Description
Operation.Builder

setAction(String value)

public Operation.Builder setAction(String value)

Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.

string action = 1;

Parameter
Name Description
value String

The action to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setActionBytes(ByteString value)

public Operation.Builder setActionBytes(ByteString value)

Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.

string action = 1;

Parameter
Name Description
value ByteString

The bytes for action to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Operation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Operation.Builder
Overrides

setPath(String value)

public Operation.Builder setPath(String value)

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.

string path = 4;

Parameter
Name Description
value String

The path to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setPathBytes(ByteString value)

public Operation.Builder setPathBytes(ByteString value)

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.

string path = 4;

Parameter
Name Description
value ByteString

The bytes for path to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Operation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Operation.Builder
Overrides

setResource(String value)

public Operation.Builder setResource(String value)

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

string resource = 3;

Parameter
Name Description
value String

The resource to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setResourceBytes(ByteString value)

public Operation.Builder setResourceBytes(ByteString value)

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

string resource = 3;

Parameter
Name Description
value ByteString

The bytes for resource to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setResourceType(String value)

public Operation.Builder setResourceType(String value)

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

string resource_type = 2;

Parameter
Name Description
value String

The resourceType to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setResourceTypeBytes(ByteString value)

public Operation.Builder setResourceTypeBytes(ByteString value)

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

string resource_type = 2;

Parameter
Name Description
value ByteString

The bytes for resourceType to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setSourcePath(String value)

public Operation.Builder setSourcePath(String value)

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.

string source_path = 6;

Parameter
Name Description
value String

The sourcePath to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setSourcePathBytes(ByteString value)

public Operation.Builder setSourcePathBytes(ByteString value)

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.

string source_path = 6;

Parameter
Name Description
value ByteString

The bytes for sourcePath to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setSourceResource(String value)

public Operation.Builder setSourceResource(String value)

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.

string source_resource = 5;

Parameter
Name Description
value String

The sourceResource to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setSourceResourceBytes(ByteString value)

public Operation.Builder setSourceResourceBytes(ByteString value)

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.

string source_resource = 5;

Parameter
Name Description
value ByteString

The bytes for sourceResource to set.

Returns
Type Description
Operation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Operation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Operation.Builder
Overrides

setValue(Value value)

public Operation.Builder setValue(Value 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.

.google.protobuf.Value value = 7;

Parameter
Name Description
value Value
Returns
Type Description
Operation.Builder

setValue(Value.Builder builderForValue)

public Operation.Builder setValue(Value.Builder builderForValue)

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.

.google.protobuf.Value value = 7;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Operation.Builder

setValueMatcher(ValueMatcher value)

public Operation.Builder setValueMatcher(ValueMatcher value)

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.

.google.cloud.recommender.v1beta1.ValueMatcher value_matcher = 10;

Parameter
Name Description
value ValueMatcher
Returns
Type Description
Operation.Builder

setValueMatcher(ValueMatcher.Builder builderForValue)

public Operation.Builder setValueMatcher(ValueMatcher.Builder builderForValue)

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.

.google.cloud.recommender.v1beta1.ValueMatcher value_matcher = 10;

Parameter
Name Description
builderForValue ValueMatcher.Builder
Returns
Type Description
Operation.Builder