Class VmExtensionPolicy.Builder (1.105.0)

public static final class VmExtensionPolicy.Builder extends GeneratedMessage.Builder<VmExtensionPolicy.Builder> implements VmExtensionPolicyOrBuilder

Represents a VM extension policy.

Protobuf type google.cloud.compute.v1.VmExtensionPolicy

Static Methods

getDescriptor()

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

Methods

addAllInstanceSelectors(Iterable<? extends VmExtensionPolicyInstanceSelector> values)

public VmExtensionPolicy.Builder addAllInstanceSelectors(Iterable<? extends VmExtensionPolicyInstanceSelector> values)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.VmExtensionPolicyInstanceSelector>
Returns
Type Description
VmExtensionPolicy.Builder

addInstanceSelectors(VmExtensionPolicyInstanceSelector value)

public VmExtensionPolicy.Builder addInstanceSelectors(VmExtensionPolicyInstanceSelector value)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameter
Name Description
value VmExtensionPolicyInstanceSelector
Returns
Type Description
VmExtensionPolicy.Builder

addInstanceSelectors(VmExtensionPolicyInstanceSelector.Builder builderForValue)

public VmExtensionPolicy.Builder addInstanceSelectors(VmExtensionPolicyInstanceSelector.Builder builderForValue)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameter
Name Description
builderForValue VmExtensionPolicyInstanceSelector.Builder
Returns
Type Description
VmExtensionPolicy.Builder

addInstanceSelectors(int index, VmExtensionPolicyInstanceSelector value)

public VmExtensionPolicy.Builder addInstanceSelectors(int index, VmExtensionPolicyInstanceSelector value)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameters
Name Description
index int
value VmExtensionPolicyInstanceSelector
Returns
Type Description
VmExtensionPolicy.Builder

addInstanceSelectors(int index, VmExtensionPolicyInstanceSelector.Builder builderForValue)

public VmExtensionPolicy.Builder addInstanceSelectors(int index, VmExtensionPolicyInstanceSelector.Builder builderForValue)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameters
Name Description
index int
builderForValue VmExtensionPolicyInstanceSelector.Builder
Returns
Type Description
VmExtensionPolicy.Builder

addInstanceSelectorsBuilder()

public VmExtensionPolicyInstanceSelector.Builder addInstanceSelectorsBuilder()

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Returns
Type Description
VmExtensionPolicyInstanceSelector.Builder

addInstanceSelectorsBuilder(int index)

public VmExtensionPolicyInstanceSelector.Builder addInstanceSelectorsBuilder(int index)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameter
Name Description
index int
Returns
Type Description
VmExtensionPolicyInstanceSelector.Builder

build()

public VmExtensionPolicy build()
Returns
Type Description
VmExtensionPolicy

buildPartial()

public VmExtensionPolicy buildPartial()
Returns
Type Description
VmExtensionPolicy

clear()

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

clearCreationTimestamp()

public VmExtensionPolicy.Builder clearCreationTimestamp()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearDescription()

public VmExtensionPolicy.Builder clearDescription()

An optional description of this resource.

optional string description = 422937596;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearExtensionPolicies()

public VmExtensionPolicy.Builder clearExtensionPolicies()
Returns
Type Description
VmExtensionPolicy.Builder
public VmExtensionPolicy.Builder clearGlobalResourceLink()

Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.

optional string global_resource_link = 516569583;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearId()

public VmExtensionPolicy.Builder clearId()

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearInstanceSelectors()

public VmExtensionPolicy.Builder clearInstanceSelectors()

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Returns
Type Description
VmExtensionPolicy.Builder

clearKind()

public VmExtensionPolicy.Builder clearKind()

Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.

optional string kind = 3292052;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearManagedByGlobal()

public VmExtensionPolicy.Builder clearManagedByGlobal()

Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy.

optional bool managed_by_global = 88605675;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearName()

public VmExtensionPolicy.Builder clearName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearPriority()

public VmExtensionPolicy.Builder clearPriority()

Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence.

optional int32 priority = 445151652;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

public VmExtensionPolicy.Builder clearSelfLink()

Output only. [Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearSelfLinkWithId()

public VmExtensionPolicy.Builder clearSelfLinkWithId()

Output only. [Output Only] Server-defined URL for this resource's resource id.

optional string self_link_with_id = 44520962;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearState()

public VmExtensionPolicy.Builder clearState()

Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

clearUpdateTimestamp()

public VmExtensionPolicy.Builder clearUpdateTimestamp()

Output only. [Output Only] Update timestamp inRFC3339 text format.

optional string update_timestamp = 120894752;

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

containsExtensionPolicies(String key)

public boolean containsExtensionPolicies(String key)

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Parameter
Name Description
key String
Returns
Type Description
boolean

getCreationTimestamp()

public String getCreationTimestamp()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public VmExtensionPolicy getDefaultInstanceForType()
Returns
Type Description
VmExtensionPolicy

getDescription()

public String getDescription()

An optional description of this resource.

optional string description = 422937596;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource.

optional string description = 422937596;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getExtensionPolicies() (deprecated)

public Map<String,VmExtensionPolicyExtensionPolicy> getExtensionPolicies()
Returns
Type Description
Map<String,VmExtensionPolicyExtensionPolicy>

getExtensionPoliciesCount()

public int getExtensionPoliciesCount()

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Returns
Type Description
int

getExtensionPoliciesMap()

public Map<String,VmExtensionPolicyExtensionPolicy> getExtensionPoliciesMap()

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Returns
Type Description
Map<String,VmExtensionPolicyExtensionPolicy>

getExtensionPoliciesOrDefault(String key, VmExtensionPolicyExtensionPolicy defaultValue)

public VmExtensionPolicyExtensionPolicy getExtensionPoliciesOrDefault(String key, VmExtensionPolicyExtensionPolicy defaultValue)

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Parameters
Name Description
key String
defaultValue VmExtensionPolicyExtensionPolicy
Returns
Type Description
VmExtensionPolicyExtensionPolicy

getExtensionPoliciesOrThrow(String key)

public VmExtensionPolicyExtensionPolicy getExtensionPoliciesOrThrow(String key)

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Parameter
Name Description
key String
Returns
Type Description
VmExtensionPolicyExtensionPolicy
public String getGlobalResourceLink()

Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.

optional string global_resource_link = 516569583;

Returns
Type Description
String

The globalResourceLink.

getGlobalResourceLinkBytes()

public ByteString getGlobalResourceLinkBytes()

Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.

optional string global_resource_link = 516569583;

Returns
Type Description
ByteString

The bytes for globalResourceLink.

getId()

public long getId()

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
long

The id.

getInstanceSelectors(int index)

public VmExtensionPolicyInstanceSelector getInstanceSelectors(int index)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameter
Name Description
index int
Returns
Type Description
VmExtensionPolicyInstanceSelector

getInstanceSelectorsBuilder(int index)

public VmExtensionPolicyInstanceSelector.Builder getInstanceSelectorsBuilder(int index)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameter
Name Description
index int
Returns
Type Description
VmExtensionPolicyInstanceSelector.Builder

getInstanceSelectorsBuilderList()

public List<VmExtensionPolicyInstanceSelector.Builder> getInstanceSelectorsBuilderList()

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Returns
Type Description
List<Builder>

getInstanceSelectorsCount()

public int getInstanceSelectorsCount()

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Returns
Type Description
int

getInstanceSelectorsList()

public List<VmExtensionPolicyInstanceSelector> getInstanceSelectorsList()

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Returns
Type Description
List<VmExtensionPolicyInstanceSelector>

getInstanceSelectorsOrBuilder(int index)

public VmExtensionPolicyInstanceSelectorOrBuilder getInstanceSelectorsOrBuilder(int index)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameter
Name Description
index int
Returns
Type Description
VmExtensionPolicyInstanceSelectorOrBuilder

getInstanceSelectorsOrBuilderList()

public List<? extends VmExtensionPolicyInstanceSelectorOrBuilder> getInstanceSelectorsOrBuilderList()

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.VmExtensionPolicyInstanceSelectorOrBuilder>

getKind()

public String getKind()

Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

getManagedByGlobal()

public boolean getManagedByGlobal()

Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy.

optional bool managed_by_global = 88605675;

Returns
Type Description
boolean

The managedByGlobal.

getMutableExtensionPolicies() (deprecated)

public Map<String,VmExtensionPolicyExtensionPolicy> getMutableExtensionPolicies()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,VmExtensionPolicyExtensionPolicy>

getName()

public String getName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
ByteString

The bytes for name.

getPriority()

public int getPriority()

Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence.

optional int32 priority = 445151652;

Returns
Type Description
int

The priority.

public String getSelfLink()

Output only. [Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
Type Description
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

Output only. [Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
Type Description
ByteString

The bytes for selfLink.

getSelfLinkWithId()

public String getSelfLinkWithId()

Output only. [Output Only] Server-defined URL for this resource's resource id.

optional string self_link_with_id = 44520962;

Returns
Type Description
String

The selfLinkWithId.

getSelfLinkWithIdBytes()

public ByteString getSelfLinkWithIdBytes()

Output only. [Output Only] Server-defined URL for this resource's resource id.

optional string self_link_with_id = 44520962;

Returns
Type Description
ByteString

The bytes for selfLinkWithId.

getState()

public String getState()

Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
Type Description
String

The state.

getStateBytes()

public ByteString getStateBytes()

Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
Type Description
ByteString

The bytes for state.

getUpdateTimestamp()

public String getUpdateTimestamp()

Output only. [Output Only] Update timestamp inRFC3339 text format.

optional string update_timestamp = 120894752;

Returns
Type Description
String

The updateTimestamp.

getUpdateTimestampBytes()

public ByteString getUpdateTimestampBytes()

Output only. [Output Only] Update timestamp inRFC3339 text format.

optional string update_timestamp = 120894752;

Returns
Type Description
ByteString

The bytes for updateTimestamp.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource.

optional string description = 422937596;

Returns
Type Description
boolean

Whether the description field is set.

public boolean hasGlobalResourceLink()

Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.

optional string global_resource_link = 516569583;

Returns
Type Description
boolean

Whether the globalResourceLink field is set.

hasId()

public boolean hasId()

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
Type Description
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.

optional string kind = 3292052;

Returns
Type Description
boolean

Whether the kind field is set.

hasManagedByGlobal()

public boolean hasManagedByGlobal()

Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy.

optional bool managed_by_global = 88605675;

Returns
Type Description
boolean

Whether the managedByGlobal field is set.

hasName()

public boolean hasName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
boolean

Whether the name field is set.

hasPriority()

public boolean hasPriority()

Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence.

optional int32 priority = 445151652;

Returns
Type Description
boolean

Whether the priority field is set.

public boolean hasSelfLink()

Output only. [Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Returns
Type Description
boolean

Whether the selfLink field is set.

hasSelfLinkWithId()

public boolean hasSelfLinkWithId()

Output only. [Output Only] Server-defined URL for this resource's resource id.

optional string self_link_with_id = 44520962;

Returns
Type Description
boolean

Whether the selfLinkWithId field is set.

hasState()

public boolean hasState()

Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
Type Description
boolean

Whether the state field is set.

hasUpdateTimestamp()

public boolean hasUpdateTimestamp()

Output only. [Output Only] Update timestamp inRFC3339 text format.

optional string update_timestamp = 120894752;

Returns
Type Description
boolean

Whether the updateTimestamp field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(VmExtensionPolicy other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

putAllExtensionPolicies(Map<String,VmExtensionPolicyExtensionPolicy> values)

public VmExtensionPolicy.Builder putAllExtensionPolicies(Map<String,VmExtensionPolicyExtensionPolicy> values)

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Parameter
Name Description
values Map<String,VmExtensionPolicyExtensionPolicy>
Returns
Type Description
VmExtensionPolicy.Builder

putExtensionPolicies(String key, VmExtensionPolicyExtensionPolicy value)

public VmExtensionPolicy.Builder putExtensionPolicies(String key, VmExtensionPolicyExtensionPolicy value)

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Parameters
Name Description
key String
value VmExtensionPolicyExtensionPolicy
Returns
Type Description
VmExtensionPolicy.Builder

putExtensionPoliciesBuilderIfAbsent(String key)

public VmExtensionPolicyExtensionPolicy.Builder putExtensionPoliciesBuilderIfAbsent(String key)

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Parameter
Name Description
key String
Returns
Type Description
VmExtensionPolicyExtensionPolicy.Builder

removeExtensionPolicies(String key)

public VmExtensionPolicy.Builder removeExtensionPolicies(String key)

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations.

map<string, .google.cloud.compute.v1.VmExtensionPolicyExtensionPolicy> extension_policies = 227761488;

Parameter
Name Description
key String
Returns
Type Description
VmExtensionPolicy.Builder

removeInstanceSelectors(int index)

public VmExtensionPolicy.Builder removeInstanceSelectors(int index)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameter
Name Description
index int
Returns
Type Description
VmExtensionPolicy.Builder

setCreationTimestamp(String value)

public VmExtensionPolicy.Builder setCreationTimestamp(String value)

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
Name Description
value String

The creationTimestamp to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public VmExtensionPolicy.Builder setCreationTimestampBytes(ByteString value)

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
Name Description
value ByteString

The bytes for creationTimestamp to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setDescription(String value)

public VmExtensionPolicy.Builder setDescription(String value)

An optional description of this resource.

optional string description = 422937596;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public VmExtensionPolicy.Builder setDescriptionBytes(ByteString value)

An optional description of this resource.

optional string description = 422937596;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

public VmExtensionPolicy.Builder setGlobalResourceLink(String value)

Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.

optional string global_resource_link = 516569583;

Parameter
Name Description
value String

The globalResourceLink to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setGlobalResourceLinkBytes(ByteString value)

public VmExtensionPolicy.Builder setGlobalResourceLinkBytes(ByteString value)

Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.

optional string global_resource_link = 516569583;

Parameter
Name Description
value ByteString

The bytes for globalResourceLink to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setId(long value)

public VmExtensionPolicy.Builder setId(long value)

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Parameter
Name Description
value long

The id to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setInstanceSelectors(int index, VmExtensionPolicyInstanceSelector value)

public VmExtensionPolicy.Builder setInstanceSelectors(int index, VmExtensionPolicyInstanceSelector value)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameters
Name Description
index int
value VmExtensionPolicyInstanceSelector
Returns
Type Description
VmExtensionPolicy.Builder

setInstanceSelectors(int index, VmExtensionPolicyInstanceSelector.Builder builderForValue)

public VmExtensionPolicy.Builder setInstanceSelectors(int index, VmExtensionPolicyInstanceSelector.Builder builderForValue)

Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.

repeated .google.cloud.compute.v1.VmExtensionPolicyInstanceSelector instance_selectors = 520298826;

Parameters
Name Description
index int
builderForValue VmExtensionPolicyInstanceSelector.Builder
Returns
Type Description
VmExtensionPolicy.Builder

setKind(String value)

public VmExtensionPolicy.Builder setKind(String value)

Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.

optional string kind = 3292052;

Parameter
Name Description
value String

The kind to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setKindBytes(ByteString value)

public VmExtensionPolicy.Builder setKindBytes(ByteString value)

Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.

optional string kind = 3292052;

Parameter
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setManagedByGlobal(boolean value)

public VmExtensionPolicy.Builder setManagedByGlobal(boolean value)

Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy.

optional bool managed_by_global = 88605675;

Parameter
Name Description
value boolean

The managedByGlobal to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setName(String value)

public VmExtensionPolicy.Builder setName(String value)

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setNameBytes(ByteString value)

public VmExtensionPolicy.Builder setNameBytes(ByteString value)

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setPriority(int value)

public VmExtensionPolicy.Builder setPriority(int value)

Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence.

optional int32 priority = 445151652;

Parameter
Name Description
value int

The priority to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

public VmExtensionPolicy.Builder setSelfLink(String value)

Output only. [Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Parameter
Name Description
value String

The selfLink to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public VmExtensionPolicy.Builder setSelfLinkBytes(ByteString value)

Output only. [Output Only] Server-defined fully-qualified URL for this resource.

optional string self_link = 456214797;

Parameter
Name Description
value ByteString

The bytes for selfLink to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setSelfLinkWithId(String value)

public VmExtensionPolicy.Builder setSelfLinkWithId(String value)

Output only. [Output Only] Server-defined URL for this resource's resource id.

optional string self_link_with_id = 44520962;

Parameter
Name Description
value String

The selfLinkWithId to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setSelfLinkWithIdBytes(ByteString value)

public VmExtensionPolicy.Builder setSelfLinkWithIdBytes(ByteString value)

Output only. [Output Only] Server-defined URL for this resource's resource id.

optional string self_link_with_id = 44520962;

Parameter
Name Description
value ByteString

The bytes for selfLinkWithId to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setState(String value)

public VmExtensionPolicy.Builder setState(String value)

Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING. Check the State enum for the list of possible values.

optional string state = 109757585;

Parameter
Name Description
value String

The state to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setStateBytes(ByteString value)

public VmExtensionPolicy.Builder setStateBytes(ByteString value)

Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING. Check the State enum for the list of possible values.

optional string state = 109757585;

Parameter
Name Description
value ByteString

The bytes for state to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setUpdateTimestamp(String value)

public VmExtensionPolicy.Builder setUpdateTimestamp(String value)

Output only. [Output Only] Update timestamp inRFC3339 text format.

optional string update_timestamp = 120894752;

Parameter
Name Description
value String

The updateTimestamp to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.

setUpdateTimestampBytes(ByteString value)

public VmExtensionPolicy.Builder setUpdateTimestampBytes(ByteString value)

Output only. [Output Only] Update timestamp inRFC3339 text format.

optional string update_timestamp = 120894752;

Parameter
Name Description
value ByteString

The bytes for updateTimestamp to set.

Returns
Type Description
VmExtensionPolicy.Builder

This builder for chaining.