Class Operation.Builder (2.14.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Operation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Operation.Builder
Overrides

build()

public Operation build()
Returns
TypeDescription
Operation

buildPartial()

public Operation buildPartial()
Returns
TypeDescription
Operation

clear()

public Operation.Builder clear()
Returns
TypeDescription
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
TypeDescription
Operation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Operation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Operation.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Operation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Operation.Builder

This builder for chaining.

clearPathFilters()

public Operation.Builder clearPathFilters()
Returns
TypeDescription
Operation.Builder

clearPathValue()

public Operation.Builder clearPathValue()
Returns
TypeDescription
Operation.Builder

clearPathValueMatchers()

public Operation.Builder clearPathValueMatchers()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Operation.Builder

clone()

public Operation.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for action.

getDefaultInstanceForType()

public Operation getDefaultInstanceForType()
Returns
TypeDescription
Operation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMutablePathFilters()

public Map<String,Value> getMutablePathFilters()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Value>

getMutablePathValueMatchers()

public Map<String,ValueMatcher> getMutablePathValueMatchers()

Use alternate mutation accessors instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for path.

getPathFilters()

public Map<String,Value> getPathFilters()

Use #getPathFiltersMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueValue
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
Value

getPathValueCase()

public Operation.PathValueCase getPathValueCase()
Returns
TypeDescription
Operation.PathValueCase

getPathValueMatchers()

public Map<String,ValueMatcher> getPathValueMatchers()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueValueMatcher
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the valueMatcher field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Operation other)

public Operation.Builder mergeFrom(Operation other)
Parameter
NameDescription
otherOperation
Returns
TypeDescription
Operation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Operation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Operation.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Operation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Operation.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Operation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueValue
Returns
TypeDescription
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
NameDescription
valueValueMatcher
Returns
TypeDescription
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
NameDescription
valuesMap<String,Value>
Returns
TypeDescription
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
NameDescription
valuesMap<String,ValueMatcher>
Returns
TypeDescription
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
NameDescription
keyString
valueValue
Returns
TypeDescription
Operation.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
NameDescription
keyString
valueValueMatcher
Returns
TypeDescription
Operation.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
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
valueString

The action to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for action to set.

Returns
TypeDescription
Operation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Operation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The path to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for path to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The resource to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for resource to set.

Returns
TypeDescription
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
NameDescription
valueString

The resourceType to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for resourceType to set.

Returns
TypeDescription
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
NameDescription
valueString

The sourcePath to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for sourcePath to set.

Returns
TypeDescription
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
NameDescription
valueString

The sourceResource to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for sourceResource to set.

Returns
TypeDescription
Operation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Operation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueValue
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueValueMatcher
Returns
TypeDescription
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
NameDescription
builderForValueValueMatcher.Builder
Returns
TypeDescription
Operation.Builder